Script-based video rendering

ABSTRACT

Systems and methods are provided for cross-platform rendering of video content on a user-computing platform that is one type of a plurality of different user-computing platform types. A script is transmitted to the user-computing platform and is interpreted by an application program compiled to operate on any one of the plurality of user-computing platform types. A series of frame images is encoded to provide the encoded video data. Encoding the frame images comprises encoding the frame images into a content-transfer format whereby the content-transfer encoded frame images can be passed by a script interpreter interpreting the script to the application program. The encoded video data is transmitted to the user-computing platform. The script is further configured to cause the script to be interpreted by the application program to: decode the transmitted encoded video data into decoded video data comprising the content-transfer encoded frame images; and render the decoded video data by displaying the frame images.

RELATED APPLICATIONS

This application is a continuation of Patent Cooperation Treatyapplication No. PCT/CA2012/050345 filed 25 May 2012 which in turn claimspriority from U.S. application No. 61/557,856 filed 9 Nov. 2011 and fromU.S. application No. 61/524,269 filed 16 Aug. 2011. All of the relatedapplications of this paragraph are hereby incorporated herein byreference.

TECHNICAL FIELD

The invention relates to methods and systems for cross-platformrendering of video content on user-computing devices using aninterpreted script. Particular embodiments provide methods and systemsfor cross-platform rendering of video content using a script embedded inan HTML document which, when interpreted by the script interpreter of aninternet browser, cause the interpreted script to directly decode videodata into frame images and causes the internet browser to nativelyrender the frame images. Particular embodiments provide methods andsystems for encoding video content.

BACKGROUND

Digital video is frequently described using a number of terms, such asvideo content, video media, audiovisual media, audiovisual content,multimedia, rich media and/or the like. In this description, videocontent should be understood to include any such content and/or mediawhich may be embodied by, or which may otherwise comprise, video data,audio data or video data in combination with audio data. In some cases,video data and/or audio data may be grouped with other data, such asimage data, metadata and/or the like. Unless otherwise indicated by thecontext, video content should be understood to potentially comprise suchimage data, metadata and/or the like. By way of non-limiting example,video content may be streamed or otherwise transmitted over the internetor some other type of data network (for example, via a host server or apeer device), cached (for example, cached by an ISP, a proxy server orsome other intermediary), locally cached (for example, cached by ainternet browser running on the user-computing device) or locally storedor otherwise locally accessible to a user computing device.

Currently, digital video content available on the internet (orotherwise) is encoded, transmitted and rendered using a wide variety oftechniques and schemes. There are a number of drawbacks associated withthe currently available video rendering technologies.

One drawback with using typical prior art digital video technologies todistribute and perform video content on a user-computing device is thata dedicated application program (typically referred to as a mediaplayer) must be downloaded and installed onto the user-computing deviceor must be pre-installed by the provider of the user-computing deviceplatform (a user-computing device platform comprises the user-computingdevice hardware and operating system software). In this description, anapplication program refers to a compiled program (executable object codemodules and/or other compiled code segments) capable of independentlyperforming applications, functions or operations on its own and withoutthe assistance of another application program. An application programcontrasts with an add-on, described further below, because an add-ondepends on a host application to provide its functionality, whereas anapplication program is capable of performing its functionalitiesindependently. Also, not all independent programs are applicationprograms. For example, virtual machines, such as the Java VirtualMachine, are not application programs, because such virtual machinesmerely provide virtual environments (such as virtual operating systemsand virtual hardware) and do not perform an independent application,function or operation. Such virtual machines require applicationprograms (such as compiled Java bytecode application programs) toperform any applications, functions or operations. Some users may beincapable of downloading or installing a separate media player. Someusers may be reluctant to download a separate media player, given thesecurity and/or privacy threats (for example, viruses, malware, localshare object and/or the like) associated with downloading filesgenerally, and executable application programs in particular.

In addition, a media player application program is typically downloadedand installed as a compiled object code module and therefore a differentcompilation target is required for each version of user-computing deviceplatform that may exist in the market. Given the growth and variety ofmobile smartphone platforms as well as the wide variety of personalcomputer platforms, the number of target platforms that have to besupported is burdensome because one compiled version of a media playerwill likely not operate on a hardware and/or operating system platformfor which it was not targeted. The complexity is increased when thecompatibility of a media player with a platform may be compromised byother installed application programs which may conflict with the mediaplayer.

Some user-computing device hardware and/or software platforms do notsupport some media player applications (or vice versa) and media playerapplications are unavailable for such hardware and software platforms.Further, a user who may want to download and install a media player willtypically require some knowledge of their user-computing device hardwareand/or software platform to download the correct player. In addition tothe issues associated with downloading and installing the media player,rendering video content requires execution of a media playerapplication, which typically consumes significant computing resources(for example, RAM, CPU time and the like), even where the particularplayer is already downloaded and installed.

Some video content rendering technologies use “hidden players” whichrefers to cases where a host application program (such as an internetbrowser or the like) operating on the user-computing deviceautomatically downloads and installs a media player add-on. In thisdescription, the term add-on should be understood to include add-ons,plug-ins, snap-ins, extensions, applets and/or the like. Add-ons arecompiled programs (that is, executable object code modules, othercompiled code segments and the like) which add specific functionalities(for example, video content rendering) to a “host” application program.While add-ons may perform some functionalities, they depend on theirhost application program for their operability. Examples of add-ons thatmay be used in connection with a host internet browser applicationprogram include: media player add-ons, PDF reader add-ons, Java VirtualMachine (JVM) add-ons and the like.

In some cases, a media player add-on (or instructions which cause theuser-computing device to download and install a media player add-on) maybe bundled with the video content file. In other cases, videodistribution techniques cause the user-computing device's internetbrowser to separately download the media player add-on and the videocontent file. Since such media player add-ons must actually bedownloaded and installed prior to execution, such media player add-onssuffer from similar drawbacks to those of their overt media playercounterparts. Some application programs (for example, internet browsers,anti-virus programs and/or the like) or operating system software mayhave security and/or privacy settings (set by their users, their networkadministrators or the like) which block the automatic download of suchmedia player add-ons. After download and installation of a media playeradd-on, execution of the media player add-on consumes significantprocessing resources. Being a compiled module, a different version ofadd-on must be created and tested for each possible destination aplatform that it could be run on.

There is a general desire to render video content in a manner whichavoids downloading and installing, pre-installing or compiling aseparate media player or media player add-on on the user-computingdevice. There is a general desire to distribute and perform videocontent in a manner which is platform independent or that has relativelyhigh degree of cross-platform operability.

Another drawback with the use of current technologies to distribute andperform content on a user-computing device occurs in the context ofstreaming video content, where current technologies typically use astreaming content server which performs some “handshaking” protocol withthe user-computing device each time that the user-computing devicerequests a video content stream. A disadvantage associated with the useof a content server and the associated handshaking protocol is that theycan preclude local (or downstream) caching of the video content. Suchlocal or downstream caching can save bandwidth (and associated costs)and improve reliability of the stream (thereby increasing the videoquality).

Another disadvantage with the use of current technologies to distributeand perform video content on a user-computing device occurs when it isdesirable to update one or more CODECs. A CODEC is a scheme for encodingaudio or video data to reduce the bandwidth necessary for itstransmission and then decoding the data at the other side of thetransmission. Typically, using a CODEC involves compressing the data onthe transmitting side and decompressing the data on the receiving side.Decoding can also involve parsing and unpacking data as it arrives atthe receiving computer device and/or reorganizing the data into a formatthat can be used by the receiving computer device. Prior art videorendering technologies typically involve the use of a compiled computerprogram module which, when executed, performs the decoding process. Ifvideo content is encoded with an updated CODEC at the transmission side,then typically the video content will not be capable of being decoded atthe user-computing device unless the new updated decoding program forthat CODEC is downloaded and installed at the user-computing device.

Various newer internet browser application programs are able to nativelyrender videos embedded in webpages using the HTML5 <video> tag.Unfortunately, CODEC support is not, at present, uniform across allbrowsers. In the ongoing development of the HTML 5 standard, therecontinues to be debate over what video formats, if any, should benatively renderable by HTML 5 compliant browsers. Though multiple copiesof video content may be provided for use with different CODECs, thistypically requires transcoding video content from one CODEC to another.Though it is possible to transcode video content so that it is encodedaccording to different CODECs, this has drawbacks. For example:

-   -   transcoding takes time and effort;    -   transcoding is typically a computationally intensive process, so        that providing real-time transcoding is, at present, technically        difficult and/or relatively computationally expensive;    -   where video content is transcoded to be encoded according to        different CODECs in advance, multiples copies of the video        content (one for each different CODEC) must typically be stored,        which may be onerous for large quantities of video content;    -   some CODECs are proprietary, and their lawful use is either        restricted or requires payment of licensing fees; and    -   serving video content encoded according to different CODECs may        require use of different streaming servers.

There is accordingly a general desire for methods and systems forrendering video content which overcome or ameliorate some of these orother drawbacks with existing video content rendering technology.

The foregoing examples of the related art and limitations relatedthereto are intended to be illustrative and not exclusive. Otherlimitations of the related art will become apparent to those of skill inthe art upon a reading of the specification and a study of the drawings.

BRIEF DESCRIPTION OF DRAWINGS

Exemplary embodiments are illustrated in referenced figures of thedrawings. It is intended that the embodiments and figures disclosedherein are to be considered illustrative rather than restrictive.

In drawings which illustrate non-limiting embodiments of the invention:

FIG. 1 is a schematic block diagram showing functional components of ascript according to a particular embodiment which may be embedded in anHTML document and which may be interpreted by an application programsuch as an internet browser to render video content;

FIG. 2A is a schematic block diagram of a video rendering systemaccording to an example embodiment;

FIG. 2B is a schematic block diagram of an audio rendering systemaccording to an example embodiment;

FIG. 3 is a flow chart of a video data queuing and decoding methodaccording to an example embodiment;

FIG. 4 is a flow chart of a video data rendering method according to anexample embodiment;

FIG. 5 is a flow chart of an audio data queuing and decoding methodaccording to an example embodiment;

FIG. 6 is a flow chart of a method for implementing an audio rendererinterface according to a particular embodiment;

FIG. 7 is a flow chart of a method for queuing and decoding audio andvideo data, rendering video data and implementing an audio rendererinterface according to another example embodiment;

FIG. 8 is a flow chart of a method for fetching video data according toa particular example embodiment; and

FIGS. 9A and 9B are schematic depictions of techniques for down-samplingframe interpolation according to particular example embodiments;

FIG. 9C is a block diagram of a method for preparing an alpha-blendedimage according to a particular embodiment suitable for use for frameinterpolation in accordance with FIGS. 9A and 9B; and

FIG. 10 is a block diagram of a method for rendering video contentwherein the script, when interpreted, tailors the rendering of the videocontent based on one or more characteristics of the user-computingdevice and/or the network connection between the server and theuser-computing device.

DESCRIPTION

Throughout the following description specific details are set forth inorder to provide a more thorough understanding to persons skilled in theart. However, well known elements may not have been shown or describedin detail to avoid unnecessarily obscuring the disclosure. Accordingly,the description and drawings are to be regarded in an illustrative,rather than a restrictive, sense.

In this disclosure and patent claims, the following technical terms havethe corresponding definitions set forth below.

-   -   Application program means a compiled program (executable object        code modules, other compiled code segments and/or the like)        capable of independently performing applications, functions or        operations on its own and without the assistance of another        application program.    -   Add-on means a compiled programs (that is, executable object        code modules, other compiled code segments and/or the like)        which add specific functionalities (for example, video content        rendering) to a “host” application program.    -   Script means a non-compiled series of cross-platform        instructions which are typically, but not necessarily,        human-readable and which are interpreted by a script interpreter        of an application program without being compiled.    -   When a script is interpreted by an application program to        perform a functionality “directly”, it means that a script        containing the expression of the functionality is interpreted to        perform the functionality itself, without relying on        pre-compiled modules provided by the application program (or        some other application program or add-on) to perform the        functionality.    -   When an application program (such as an internet browser)        performs a functionality “natively”, it means that the        application program performs the functionality by itself (with        the possible assistance of the computing device hardware and/or        operating system), but without having to rely on an add-on. An        application program may natively perform a functionality by        calling on its own pre-compiled code modules, but not the        pre-compiled code modules of an add-on. An application program        can natively perform a functionality under the direction of a        script.

Particular embodiments of the invention provide methods and systems forrendering video content on a user-computing device using across-platform script which is interpreted by an application program(such as an internet browser) to natively render the video and/or audiodata that embodies the video content. Particular functionalities of thevideo rendering process may be performed directly by the script as thescript is interpreted. In this description, the term script means anon-compiled series of cross-platform instructions which are typically,but not necessarily, human-readable and which are interpreted by ascript interpreter of an application program without being compiled.Typical application programs and add-ons are compiled prior to executioninto machine code. A script contrasts with conventional compiled codeapplication programs and add-ons because the script is not compiled. Ascript is also distinct from Java bytecode. Bytecode is partiallypre-compiled prior to being interpreted and is compiled into machinecode as it is interpreted. In contrast, a script is not compiled intomachine code as it is interpreted. In this description, when a script isinterpreted, it is meant that a script interpreter of an applicationprogram reads the scripted instructions and performs the scriptedinstructions without compiling the scripted instructions into machinecode.

By way of non-limiting example, in some embodiments, a script may beembedded in a Hypertext Markup Language (HTML) document and may beinterpreted by an internet browser application program running on auser-computing device when the internet browser application programrenders the HTML document to thereby display the HTML page. The internetbrowser operating on the user-computing device may receive the HTMLdocument from a location on the internet specified by a UniversalResource Locator (URL) input into the browser. Most internet browserapplication programs include one or more native script interpreterswhich natively interpret scripts. By way of non-limiting example, thescript may be written in a cross-platform scripting syntax, such asECMAScript, JavaScript, Jscript, ActionScript, a scripting syntaxinherent in an HTML standard (for example, HTML 5) and/or the like. Inthis description, when an application program (such as an internetbrowser) performs a functionality or operation natively, it is meantthat the application program itself performs the functionality (with thepossible assistance of the computing device hardware and/or operatingsystem), but without having to rely on an add-on. An application programmay natively perform a functionality by calling on its own pre-compiledcode modules, but not the pre-compiled code modules of an add-on.

Particular aspects of the invention provide scripts which can beinterpreted by application programs (such as internet browsers) to causethe browser to natively render video data on a user-computing device. Insome embodiments, the user-computing device may use a differentapplication program (for example, other than an internet browser) whichmay include a native script interpreter or which is otherwise capable ofinterpreting scripts. In such embodiments, scripts may be interpreted bysuch other application programs and, when so interpreted, may cause suchother application programs to natively render video data on theuser-computing device. For the sake of brevity and without loss ofgenerality, the remainder of this application may refer to scripts beinginterpreted by internet browsers to cause the internet browsers tonatively render video data. References to internet browsers should beunderstood to include other application programs that are not internetbrowsers but which may include one or more script interpreters or whichmay otherwise be capable of natively interpreting scripts. By way ofnon-limiting example, such scripts may, but need not necessarily be,provided in documents communicated using the hypertext transportprotocol (HTTP)).

In some embodiments, an application program may interpret a script andthereby cause the interpreted script to directly perform one or morefunctionalities (associated with video and/or audio rendering). In thisdescription, when a script is interpreted by an application program toperform a functionality directly, it means that the script isinterpreted to perform the functionality itself. When a script isinterpreted by an application program to perform a functionalitydirectly, the interpreted script contains the expression of thefunctionality and does not rely on pre-compiled modules provided by theapplication program (or some other application program or add-on) toperform the functionality. For example, in some embodiments, an internetbrowser may interpret a script to cause the interpreted script todirectly: perform a decoding functionality which decodes video contentfrom its encoded format into frame images; re-format frame images into aformat that can be natively rendered by the internet browser; and/orcontrol or synchronize the timing of video and audio rendering.

Particular embodiments involve using a script embedded in a HMTLdocument which is interpreted by an internet browser to cause theinterpreted script to directly decode video data into a series ofindividual frame images and to natively display the series of frameimages as a series of bitmaps on a display of the user-computing device.Some embodiments similarly involve additionally using a script which isinterpreted by an internet browser to cause the interpreted script todirectly decode audio data and to natively playback the decoded audiodata on the user-computing device. Where video content comprises bothvideo data and audio data, the script may be interpreted by the internetbrowser to synchronize the display of frame images with the playback ofdecoded audio data, thereby rendering audio-visual video content (forexample, movies) in a manner that the user expects to experience.

Particular embodiments provide methods and systems for encoding videocontent which are suitable for use with the aforementioned script-basedvideo rendering techniques.

Computers and similar user-computing devices generally understandmachine or object code which may vary as between microprocessor types.Software engineers usually program in a so called “high level” language,like C, then use a compiler which will convert the high level code(typically referred to as source code) machine or object code ahead oftime. A drawback with programming in a high level language and thencompiling the human-readable source code into a compiled and executableversion is that the compiled version of the program is not portable or“cross-platform”. The compiled code is created specifically for a targetuser-computing platform (hardware and operating system of theuser-computing device). This can be problematic in some circumstances asdescribed above.

To address this issue, cross-platform computer languages have beenproposed—for example, Java. This computer language is partiallypre-compiled into so-called bytecode prior to being received at theuser-computing device and expects that the user computing device cancall an additional pre-compiled program (known as a Java virtual machine(JVM)) which will understand the bytecode. Being compiled code, the JVMwhich interprets the bytecode at the user-computing device is particularto the user-computing platform. The JVM might not be available toparticular user-computing device platforms or may have limitedfunctionality for particular platforms. Accordingly, the use of Java(and similar computer languages which rely on virtual machines) onlyshifts the cross-platform operability problem from individual programsto the JVM. That is, instead of pre-compiled programs needing to targeta variety of specific user-computing platforms, the JVM needs to targetspecific a variety of user computing platforms.

Unlike compiled languages and partially compiled languages like Java,scripts are not compiled. Scripts comprise a series of instructions (forexample, script tags) written in accordance with a various scriptingsyntaxes (for example, ECMAScript, JavaScript, Jscript, ActionScript,scripting syntax(es) inherent in an HTML standard and/or the like).Scripted instructions are not compiled, but rather they are interpreted(without being compiled) by application programs operating on theuser-computing device to cause the application programs to performcertain actions. A difficulty with using scripts, particularly forprocessor-intensive tasks, is that the interpretation of scripts isrelatively slow (for example, when compared to compiled programs),because the interpretation occurs at run time. Consequently, to theinventors' knowledge scripts comprising a series of script tags have notheretofore been used to cause an internet browser operating on auser-computing device to natively render video content. As discussedabove, prior art video rendering technologies rely on precompiled mediaplayers, add-ons, JVM and/or the like which have been compiled forspecific hardware and software platforms.

FIG. 1 is a block diagram schematic showing functional components of ascript 10 for rendering video content on a user-computing device (notexpressly shown in FIG. 1) according to a particular embodiment. Script10 may comprise a series of scripting tags written in a cross-platformscript syntax, such as, by way of non-limiting example, ECMAScript,JavaScript, Jscript, ActionScript or the like. The scripting syntax inwhich rendering engine script 10 is written is preferably widelysupported by major operating systems, internet browsers and/or otherapplication programs, so that script 10 may be platform independent andthereby operate on a wide variety of user-computing devices (by way ofnon-limiting example, desktops, laptops, tablets, smartphones, personalcomputing devices, application specific devices and/or the like). Asdiscussed above, user-computing devices may have a wide variety ofplatforms and script 10 may be capable of being interpreted on a widevariety of user-computing devices having a wide variety of platforms.Script 10 may be embedded in a HTML document such that when script 10 isinterpreted by an internet browser operating on a user-computing device,script 10 causes the internet browser to natively provide the functionalcomponents shown in FIG. 1. In some embodiments, an internet browseroperating on a user-computing device may natively interpret script 10which may in turn cause the internet browser to natively render videodata without requiring that the user-computing device download, installor execute any additional pre-compiled decoder for a CODEC, media playeradd-on or other media player application to run alongside or inconjunction with the internet browser.

In one particular embodiment, an HTML document comprises script 10 and areference to a video content file. Script 10 may be interpreted by aninternet browser operating on a user-computing device to cause theinternet browser to render the video content. The video content renderedas a result of the interpretation script 10 may be: streamed 12 (orotherwise transmitted) over a network communication link (for example,from the internet or from some other network with which theuser-computing device is capable of communicating via a host server or apeer device); accessed from a downstream network cache 14 via a suitablenetwork communication link (for example, cached by an ISP, a proxyserver or some other intermediary); locally cached 15 (for example,cached in a local cache by an internet browser operating on auser-computing device or otherwise cached in a local cache accessible tothe user-computing device); contained in a local file 16 (for example, afile stored in local memory accessible to the user-computing device);and/or the like.

When interpreted, script 10 may cause the internet browser to nativelyprovide a data-receiving element 20 which receives the video content(streamed or otherwise downloaded 12, accessed from one or moredownstream caches 14, locally cached 15, locally stored 16 and/or thelike 17), accesses the encoded video content and de-multiplexes (orotherwise separates) the different types of data (for example, videodata 22 and optionally audio data 24, image data 26 and metadata (notshown)) which may originally be contained in a single data source.

Typically, video data 22 accessed by data receiving block 20 will beencoded using some CODEC scheme. Accordingly, when interpreted by thebrowser, script 10 of the illustrated embodiment causes the internetbrowser to provide a decoding element 30 which natively operates todecode video data 22 and to thereby obtain decoded (and typicallydecompressed) video data 42. In some embodiments, the block 30 decodingfunctionality may be performed directly by the script. The particulardecoding and decompression scheme implemented by decoding element 30will of course depend on the encoding scheme, or CODEC, used to encodeand compress video data 22. Accordingly, the specification of theencoding scheme and corresponding decoding scheme may be known to thedevelopers of script 10. These encoding and decoding schemes (and inparticular the decoding scheme implemented by decoding element 30) maycomprise open source or otherwise publicly available standards, althoughthis is not necessary.

Similarly to video data 22, audio data 24 accessed by data-receivingblock 20 will typically be encoded using some CODEC. Accordingly, whenexecuted, script 10 of the illustrated embodiment causes the internetbrowser to provide a decoding element 32 which natively operates todecode audio data 24 and to thereby obtain decoded (and typicallydecompressed) audio data 44. In some embodiments, the block 32 decodingfunctionality may be performed directly by the script. The particulardecoding and decompression scheme implemented by decoding element 32will of course depend on the CODEC used to encode and compress audiodata 24. Accordingly, the specification of the encoding scheme andcorresponding decoding scheme may be known to the developers of script10. These encoding and decoding schemes (and in particular the decodingscheme implemented by decoding element 32) may comprise open source orotherwise publicly available standards, although this is not necessary.In a manner similar to that of video data 22 discussed above, compressedaudio data encoded in a proprietary format may be decoded into apublicly available format to provide audio data 24, so that decodingelement 32 may be implemented through the execution of a publiclyvisible script 10.

When interpreted, script 10 also causes the internet browser to providea video display element 50 which natively displays frame images from thedecoded video data stream 42 on a display 70 of the user-computingdevice. Once encoded video data 22 is decoded in decoding block 30 toprovide a decoded video stream 42 (comprising a series of frame images,for example), decoded video stream 42 is displayed on the display of theuser-computing device by display element 50. In some embodiments,display element 50 involves using the so called canvas element or canvastag. The canvas tag is a HTML5 tag which allows for dynamic, scriptablerendering of 2D shapes and bitmap images (of a specified pixel heightand width) on the display of a user-computing device (for example,display 70). The canvas tag may be used to display bitmap images at aframe rate that is sufficiently fast that it is perceived by humans tobe video.

In some embodiments, display element 50 involves using the canvas tag todisplay a subset of the frame images of decoded video data stream 42.For example, bitmap frames of decoded video stream 42 may be dropped incircumstances where an optional synchronization block 60 (explained inmore detail below) indicates that display block 50 is displaying bitmapimages at a rate that is falling behind the playback of audio data 44and/or in other circumstances where available processing resources mightmake it desirable to display a subset of the frame images of decodedvideo stream 42. In some embodiments, frame images may be caused topersist on the display of the user-computing device—for example, whensynchronization functionality 60 indicates that display element 50 isdisplaying images at a rate that is leading the playback of audio data44. Where display element 50 involves using the canvas tag to display asubset of the frame images of decoded video stream 42, display element50 and/or synchronization block 60 may involve selecting particularframe images from within decoded video stream 42 for display.

In some embodiments, the execution of script 10 causes the internetbrowser to provide display block 50 whose functionalities (for example,displaying frame images (for example, bitmap frame images) from withindecoded video stream 42 and optionally selecting frame images fromwithin decoded video stream 42 for display) are implemented natively bythe internet browser without calling or otherwise executing anyadditional pre-compiled application program or add-on.

Because of the continually increasing processing power of digitaldevices, display element 50 provided by the execution of script 10 isable to display bitmap images at frame rates that approach those ofconventional video playback using customized video playbackapplications. In some embodiments, display element 50 is capable ofdisplaying 640×480 pixel bitmap images at frame rates greater than 40frames/second. In some embodiments, display element 50 is capable ofdisplaying 640×480 pixel bitmap images at frame rates greater than 50frames/second.

In the illustrated embodiment, the video content comprises optionalimage data 26. Display element 50 may also cause image data 26 to benatively displayed on user-computing device 70. Most internet browsersinclude a native functionality for displaying JPEG image data which maybe called by the browser under instruction from the portion of script 10associated with the provision of display element 50.

When implemented, script 10 also provides an audio playback element 52for natively playing back decoded audio stream 44. In some embodiments,decoded audio stream 44 comprises a .WAV format audio stream. Mostinternet browsers include a native functionality for playback of .WAVformat audio streams which may be called by the browser underinstruction from the portion of script 10 associated with audio playbackelement 52. This native audio playback functionality may also compriseor have access to time reference information associated with theplayback of decoded audio stream 44. This playback time referenceinformation may be fed back to synchronization block 60 described below.

Script 10, when implemented, may optionally cause the internet browserto provide a synchronization block 60 which maintains synchronizationwithin acceptable tolerance between the playback of decoded audio data44 by audio playback element 52 and the display of frame images fromdecoded video data 42 by display element 50. In some embodiments,synchronization block 60 makes use of a reference timing point (forexample, the start of playback of audio data 44) and time stampinformation (referred to as an audio playback time reference) obtainedfrom audio playback block 52. In some embodiments, synchronization block60 may cause display element 50 to check the audio playback timereference from audio playback block 52 prior to selecting a frame imagefor display. Synchronization block 60 may then cause display element 50to select an frame image which corresponds to the audio playbackreference time and to display the selected frame image as a bit mapusing the canvas tag. If the audio playback reference time from audioplayback element 52 indicates that the playback of decoded audio data 44is leading the display of frame images from within decompressed videodata 42, then synchronization block 60 may cause display element 50 toskip over one or more frame images. If the audio playback reference timefrom audio playback element 52 indicates that the playback of decodedaudio data 44 is trailing the display of frame images from withindecompressed video data 42, then synchronization block 60 may causedisplay element 50 to cause a delay in the update of frame images (forexample, to cause some frame images to persist). In this manner, thevideo data displayed by display element 50 may be synchronized with theaudio playback of audio playback element 52.

A control panel 80 functionality may be provided to a user (notshown)—through a graphical user interface, for example. Control panel 80may provide a user with the ability to control the playback of videodata 42 and/or audio data 44 by script 10. By way of non-limitingexample, control panel 80 may provide the user with the control to playback the data, to pause the playback of the data, to seek a location intime within the data, to adjust the volume of the playback, to adjustthe speed of the playback or the like. In the illustrated embodiment,control panel 80 is provided outside of script 10, but this is notnecessary. In some embodiments, script 10 may cause the internet browserto provide control panel 80.

FIG. 2A is a schematic block diagram of a video rendering system 100according to an example embodiment. In some embodiments, video renderingsystem 100 is implemented, at least in part, using a cross-platformscript interpreted by a script interpreter embodied by an internetbrowser (or other application program) operating on a user-computingdevice. In some embodiments, parts of video rendering system 100 areimplemented natively by the internet browser interpreting a script. Insome embodiments, the script directly performs or implements some of thefunctionalities of video rendering system 100.

In the illustrated embodiment, video rendering system 100 procures videocontent 116. In some embodiments, video content 116 resides on anetwork-accessible host server, a network-accessible cache or a networkaccessible peer device. In other embodiments, video content 116 may belocally available to the user-computing device. In the remainder of thisdescription, it is assumed (without loss of generality) that videocontent 116 resides on a host server. In particular embodiments, videorendering system 100 retrieves video content 116 by transmitting to theserver an HTTP request containing a URL identifying particular videocontent 116 hosted at the server (for example, by initiating a“download” or “stream” of video content 116 from the server). Asdiscussed above, video content 116 may comprise video data 114 as wellas other data, such as audio data 164, image data (not shown), metadata(not shown) and/or the like. In the illustrated embodiment, videocontent 116 provided to video rendering system 100 may generally includeany such data and is de-multiplexed by video rendering system 100 toaccess video data 114 contained therein. In other embodiments, videocontent 116 may be de-multiplexed prior to being received at videorendering system 100 by a suitable de-multiplexer (not shown) toseparate video data 114 from video content 116 and to provide videorendering system 100 direct access to de-multiplexed video data 114.Such a de-multiplexer may also be implemented, at least in part, using across-platform script interpreted by an internet browser operating onthe user-computing device.

In the illustrated embodiment, video rendering system 100 comprises avideo data queue monitor 110 configured to cause video data 114 fromvideo content 116 to be stored in a data structure embodying a videodata queue 112 and to monitor video data queue 112. In some embodiments,video queue monitor 110 is implemented in an internet browser operatingon the user-computing device. In some embodiments, storing video data114 in video data queue 112 comprises de-multiplexing video data 114from audio data 164 and other data (for example, images, metadata and/orthe like) which may form part of video content 116. This de-multiplexingfunctionality may be implemented by video data queue monitor 110. Inother embodiments, video data queue monitor 110 need not perform thisde-multiplexing functionality. As discussed above, in some embodiments,video data 114 may be de-multiplexed by another de-multiplexer (notshown) prior to being received by video rendering system 100. In stillother embodiments, data stored in video data queue 112 comprises videocontent 116 (which is not yet de-multiplexed) and video data 114 may bede-multiplexed from audio data 164 and/or other data while being decodedby decoder 122.

System 100 comprises a video decoder 122. Video decoder 122 decodesvideo data 114 to provide frame images. In particular embodiments, videodecoder 122 is directly implemented by a script when the script isinterpreted by an internet browser. System 100 comprises a frame buffermonitor 120. In the illustrated embodiment, frame buffer monitor 120 isconfigured to cause a decoder 122 decode video data 114 contained invideo data queue 112 into frame images and to cause frame imageprocessor 136 to process those frame images to thereby produce frameimages 124, which are stored in a data structure embodying a frame imagebuffer 126 and which are in a format suitable for display by frame imagerenderer 132. Frame buffer monitor 120 may be implemented natively by aninternet browser. In some embodiments, the functionality of frame buffermonitor 120 is implemented directly by the script when the script isinterpreted by an internet browser. Frame images 124 comprise a sequenceof images which when rendered sequentially (for example, at a suitableframe rate which may be the frame rate of video data 114) are perceivedby humans to be video. Frame buffer monitor 120 may be configured tocause decoder 122 and frame image processor 136 to continually decodeand process frame images 124 from video data 114 until there are atleast a threshold number of frame images 124 in frame image buffer 126(for example, until frame image buffer 126 is full).

In the illustrated embodiment, optional frame image processor 136receives frame images 140 (for example, frame images 140 decoded fromvideo data 114) by video decoder 122 and processes such frame images 140to generate frame images 124 in a format suitable for use by frame imagerenderer 132. In particular embodiments, some of the functionalities offrame image processor 136 are implemented directly by the script whenthe script is interpreted by an internet browser. Frame images 140output from decoder 122 may comprise image files of any suitable graphicfile format, including by way of non-limiting example: JPEG, GIF, PNG,TIFF, RAW, BMP and/or the like. Some internet browsers are capable ofnatively displaying a limited subset of possible image file formats. Forexample, most every internet browser is capable of natively displayingJPEG and GIF image file formats, but many internet browsers areincapable of natively displaying images having the TIFF file format. Insuch cases, frame image processor 136 may comprise frame image converter142 which converts frame images 140 into browser-renderable frame images144 having one or more image file formats (for example, GIF and/or JPEG)natively displayable by the internet browser. The functionality of frameimage converter 142 may be implemented directly by the script when thescript is interpreted by the internet browser. It will be appreciatedthat in circumstances where frame images 140 are already in a fileformat that can be natively displayed by an internet browser operatingon the user-computing device, then frame image converter 142 is notrequired or may be bypassed.

Frame images 144 are typically represented in so-called binary dataformats. Some internet browsers are incapable of accepting images inbinary data formats when such images are transferred or otherwise passedfrom a script interpreter. In such circumstances, frame images 144 maybe further processed by frame image processor 136 into a format suitablefor being passed from the script interpreter to the internet browser. Inthe illustrated embodiment, this processing functionality is performedby content-transfer encoder 145 which processes frame images 144 togenerate content-transfer encoded frame images 146. The functionality ofcontent-transfer encoder 145 may be implemented directly by the scriptwhen the script is interpreted by the internet browser. In oneparticular embodiment, content-transfer encoder 145 comprises a base64encoder which processes frame images 144 to generate base64 encodedframe images 146. This is not necessary. In other embodiments, othercontent-transfer encoding techniques may be used in the place of base64encoding and frame images 146 may be encoded in accordance with someother suitable content-transfer encoding format.

Frame image processor 136 may then use content-transfer encoded frameimages 146 to create image objects using image object creator 148. Insome embodiments, image object creator 148 involves causing the scriptinterpreter to invoke a canvas element or the like which is nativelyimplemented by the internet browser to use content-transfer encodedframe images 146 to create frame images 124 in the form ofCanvasPixelArray image objects, each containing an array of RGB pixelvalues. In other embodiments, image object creator 148 can usecontent-transfer encoded frame images 146 to create frame images 124 inother image object formats. In some embodiments, content-transferencoded frame images 146 may be passed to the browser by image objectcreator 148 (or otherwise) using script instructions having a form of:

image.src=“data:image/jpg;base64,”+jpeg_encoded_in_content-transfer_format;

As discussed above, frame images 124 may be in a format suitable fordisplay by frame image renderer 132 and may be stored in a datastructure embodying frame image buffer 126.

In the illustrated embodiment, decoded frame images 140,browser-renderable frame images 144 and content-transfer encoded frameimages 146 are shown as being respectively stored in decoded frame imagebuffer 138, browser-renderable frame image buffer 141 andcontent-transfer encoded frame image buffer 143. Such buffers 138, 141,143 can be useful in some embodiments, particularly (but withoutlimitation) when the functionalities of any of video decoder 122, frameimage converter 142, content-transfer encoder 145 and/or image objectcreator 148 are performed independently of one another in discreteiterations (explained in more detail below). In other embodiments, suchbuffers 138, 141, 143 are not necessary—i.e. in each iteration, videodecoder 122 may create a single decoded frame image 140, which frameimage converter 142 may in turn convert into a single correspondingbrowser-renderable frame image 144, which base64 encoder may in turnencode into a single corresponding content-transfer encoded frame image146, which image object creator 148 may in turn use to create a singleframe image object 124 to be added to frame image buffer 126.

Frame image processor 136 of the illustrated embodiment is optional. Inother embodiments, any of the functionalities of frame image processor136 may be incorporated into decoder 122 and/or into video playbackinterface 130 (described further below). By way of non-limiting example,the functionality of frame image converter 142 may be incorporated intodecoder 122 and the functionality of image object creator may beincorporated into video playback interface 130. In another non-limitingexample, the functionality of all of frame image processor 136 may beincorporated into decoder 122.

Video data queue monitor 110 may be configured to clear video data 114(or video content 116) from video data queue 112 after video data 114has been decoded by decoder 122. In some embodiments, video data queuemonitor 110 is configured to request video content 116 (and/or videodata 114 contained therein) from a video content source (for example, aremote server) based on the amount of video data 114 in video data queue112 that has yet to be decoded by decoder 122. For example, video dataqueue monitor 110 may be configured to request video content 116 and/orvideo data 114 whenever video data queue 112 contains less than athreshold amount of video data 114 that has yet to be decoded by decoder122—for example, a threshold amount of video data 114 corresponding to asuitable threshold number of frame images 124. Where video data 114comprises a portion of a known length video segment (for example, apre-recorded program, film clip, movie, etc.) or when the end of videodata 114 is otherwise discernable, video data queue monitor 110 may beconfigured to stop requesting video content 116 and/or video data 114after a portion of video data 114 constituting the end of video data 114has been placed into video data queue 112.

System 100 comprises video playback interface 130. The functionality ofvideo playback interface 130 may be implemented directly by the scriptwhen the script is interpreted by the internet browser. Video playbackinterface 130 is configured to synchronize the display of frame images124 by a frame renderer 132 (e.g. to the playback of audio data) or tootherwise cause frame renderer 132 to display frame images 124 atappropriate times. Frame renderer 132 may be implemented in whole or inpart by an image rendering engine provided natively on an internetbrowser operating on a user-computing device, for example. Framerenderer 132 may comprise invoking a drawlmage( ) method and/or aputImageData method having as (one of) its argument(s) an ImageDataobject comprising a frame image 124.

In some embodiments, video playback interface 130 is configured to causeframe renderer 132 to display frame images 124 at a rate that isapproximately equal to the frame rate of video data 114. In someembodiments, video playback interface 130 is configured to cause framerenderer 132 to display frame images 124 at a rate that is less than theframe rate of video data 114 and optionally to display interpolatedimages between the display of frame images 124. In some embodiments,video playback interface 130 may cause frame renderer 132 to displayframe images 124 at a user-configurable rate. Video playback interface130 may be configured to cause frame renderer 132 to render frame images124 at least approximately synchronously with the rendering of audiodata 164 that accompanies video data 114 in video content 116, withinsome suitable tolerance. Because video playback interface 130 maycontrol the timing of the rendering of frame images 124 by framerenderer 132, video playback interface 130 may be referred to asplayback timing monitor 130.

FIG. 2B is a schematic block diagram of an audio rendering system 150according to an example embodiment. In some embodiments, audio renderingsystem 150 is implemented, at least in part, using a cross-platformscript interpreted by an internet browser operating on a user-computingdevice. In some embodiments, part of audio rendering system 150 isimplemented natively by the internet browser interpreting a script. Insome embodiments, the script directly performs or implements some of thefunctionalities of audio rendering system 150. In some embodiments, allor portions of video rendering system 100 (FIG. 2A) and audio renderingsystem 150 (FIG. 2B) may be integrated with one another. In someembodiments such as the exemplary embodiment shown in FIGS. 2A and 2B,video rendering system 100 (FIG. 2A) and audio rendering system 150(FIG. 2B) may be separately implemented. In some respects, audiorendering system 150 is similar to video rendering system 100 describedabove. Audio rendering system 150 may retrieve video content 116 in thesame manner as video rendering system 100. Video content 116 retrievedby video rendering system 100 may be accessible to audio renderingsystem 150 and vice versa.

As discussed above, video content 116 provided to audio rendering system100 may generally include video data 114, audio data 164, image data(not shown), metadata (not shown) and/or the like. Audio renderingsystem 150 of the illustrated embodiment comprises an audio data queuemonitor 160 configured to cause audio data 164 from video content 116 tobe stored in a data structure embodying an audio data queue 162 and tomonitor audio data queue 162. Audio data queue monitor 160 may beanalogous to video data queue monitor 110 of video rendering system 100.In some embodiments, audio data queue monitor 160 is implemented in aninternet browser operating on a user-computing device. In someembodiments, storing audio data 164 in audio data queue 162 comprisesde-multiplexing audio data 164 from video data 114 and other data (forexample, image data, metadata and/or the like) which may form part ofvideo content 116. This de-multiplexing functionality may be implementedby audio data queue monitor 160. In general, however, audio data queuemonitor 160 need not perform this de-multiplexing functionality. Asdiscussed above, in some embodiments, audio data 164 may bede-multiplexed by another de-multiplexer (not shown) prior to beingreceived by audio rendering system 150. In still other embodiments, datastored in audio data queue 162 is not yet de-multiplexed and audio data164 may be de-multiplexed from video data 114 and/or other data whilebeing decoded by decoder 172. In such embodiments, video data queue 112and audio data queue 162 may both be implemented by the same videocontent queue (not shown) which may store video content 116.

Audio rendering system 150 comprises an audio decoder 172. Audio decoder172 decodes audio data 164 to provide decoded audio data 174. Inparticular embodiments, audio decoder 172 is directly implemented by ascript when the script is interpreted by an internet browser. Audiorendering system 150 of the illustrated embodiment comprises a decodedaudio buffer monitor 170. Decoded audio buffer monitor 170 is configuredto cause a decoder 172 decode audio data 164 contained in audio dataqueue 162 to produce decoded audio data 174, which is stored in a datastructure embodying a decoded audio buffer 176. Decoded audio buffermonitor 170 may be implemented natively by an internet browser. In someembodiments, the functionality of decoded audio buffer monitor 170 isimplemented directly by the script when the script is interpreted by aninternet browser. Decoded audio buffer monitor 170 may be configured tocause decoder 172 to continually decode audio data 164 and to generatedecoded audio data 174 until there is at least a threshold amount ofdecoded audio data 174 in decoded audio buffer 176 (for example, untildecoded audio buffer 176 is full). Decoded audio data 174 may compriseaudio data in a format that can be rendered natively by an internetbrowser operating on a user-computing device (for example, using thebrowser's native audio playback function(s)). In some embodiments, audiorendering system 150 may comprise an audio data processor (not shown)comprising one or more functionalities to convert audio data 164 into adecoded format 174 suitable for use by an internet browser operating ona user-computing device using native audio playback functionalities. Insome embodiments, such functionalities can be performed by decoder 172and/or audio renderer interface 180.

Audio data queue monitor 160 may be configured to clear audio data 164(or video content data 116) from audio data queue 162 after audio data164 has been decoded by decoder 172. In some embodiments, audio dataqueue monitor 160 is configured to request video content 116 (and/oraudio data 164 contained therein) from a video content source (forexample, a remote server) based on the amount of audio data 164 in audiodata queue 162 that has yet to be decoded by decoder 172. For example,audio data queue monitor 160 may be configured to request video content116 and/or audio data 164 whenever audio data queue 162 contains lessthan a threshold amount of audio data 164 that has yet to be decoded bydecoder 172. When the end of audio data 164 is detectable, audio dataqueue monitor 160 may be configured to stop requesting video content 116and/or audio data 164 after a portion of audio data 164 constituting theend of audio data 164 has been placed into audio data queue 162.

Audio rendering system 150 comprises audio renderer interface 180. Audiorenderer interface 180 is configured to provide (for example, to load)decoded audio data 174 to audio renderer 182 in a format suitable foruse by audio renderer 182. Audio renderer 182 may comprise an audioplayback engine provided natively in an internet browser operating on auser-computing device, for example. In some embodiments, audio renderer182 may use dedicated audio rendering hardware and may render (forexample, playback) the audio data in one or more process(es) parallel tothe process(es) running on the main user-computing device processor. Insome embodiments, audio renderer 182 may be implemented (at least inpart) using the main user-computing device processor, but may still beimplemented in one or more processing thread(s) that run parallel tothat of the thread(s) responsible for video rendering system 100 andaudio rendering system 150. In some embodiments, audio rendererinterface 180 may optionally be configured to ascertain playback timinginformation (for example, an audio playback time reference) associatedwith the rendering of decoded audio data 174 by audio renderer 182. Theplayback timing information obtained by audio renderer interface 180 maybe obtained natively by the internet browser. Other functionalities ofaudio renderer interface 180 may be directly performed by theinterpreted script. This playback timing information can be used byframe image renderer 132 and/or video playback interface 130 (FIG. 2A)to cause frame images 124 to be rendered by frame renderer 132 at a ratethat is approximately synchronous with the rendering of decoded audiodata 174 by audio renderer 182.

In some embodiments, it may be possible to de-multiplex an entire streamof audio data 164 from video content 116 and to buffer the entire streamof audio data 164 in audio data queue 162. In such embodiments, audiodata queue monitor 160 need not actively monitor the status of audiodata queue 162 to determine when to retrieve more audio data 164.Instead, audio data queue monitor 160 may make a single request foraudio data 164. Similarly, in such embodiments, the entire stream ofaudio data 164 may be decoded by decoder 172 and stored as decoded audiodata 174 in decoded audio buffer 176. In such embodiments, decoded audiobuffer monitor 170 need not actively monitor the status of decoded audiobuffer 176 and may instead make a single request for the stream of audiodata 164 to be decoded by decoder 172 and placed in decoded audio buffer176.

Some internet browsers comprise native functionality that allows them tonatively render encoded audio data 164. By way of non-limiting example,Firefox™ can natively handle the Vorbis encoded audio format and Safari™and Internet Explorer™ can natively handle the mp3 encoded audio format.In such embodiments, decoder 172, decoded audio buffer 176 and decodedaudio buffer monitor 170 may not be required and audio rendererinterface 180 can provide encoded audio data 164 from audio data queue162 directly to audio renderer 182.

In some embodiments, the functionality of video rendering system 100and/or audio rendering system 150 is achieved, at least in part, by oneor more methods implemented using a cross-platform script embedded in anHTML document. Such a script may be interpreted by a script interpreterprovided embodied as part of an application program operating at auser-computing device. For example, such a script interpreter may be apart of the internet browser. The interpretation of such a script by thescript interpreter may cause execution of logical and/or arithmeticoperations, and instantiation and/or manipulation of data structures,which provide functionality of video rendering system 100 and/or audiorendering system 150.

In some embodiments, the functionality of video rendering system 100 isachieved, at least in part, by the script interpreter implementing twomethods: one method providing the video data queuing, decoding andpreparation functionalities of system 100 (for example, by implementingvideo data queue monitor 110, frame buffer monitor 120, decoder 122 andframe image processor 136) and another method providing the frame imagesynchronization and rendering functionalities of system 100 (forexample, by implementing video playback interface 130 and, optionally,frame image renderer 132). FIG. 3 schematically depicts animplementation of this first method for queuing, decoding and preparingvideo data according to a particular embodiment. FIG. 4 schematicallydepicts an implementation of this second method for synchronizing andrendering frame images of the video data according to a particularembodiment. The script interpreter may be caused to repeatedly performthese two methods in asynchronous fashion to incrementally queue,decode, prepare, synchronize and render video data. Such incrementalqueuing, decoding, preparing, synchronizing and rendering of video datamay be advantageous where the methods are implemented in a script thatis interpreted by a single-threaded interpreter.

FIG. 3 is a flowchart of a method 200 for obtaining and decoding videodata according to an example embodiment. Method 200 may be implementednatively by an internet browser operating on a user-computing device,when the browser interprets a cross-platform script (or part of ascript). For example, method 200 may be implemented as a set of scriptedinstructions (for example, a set of Javascript instructions). Particularfunctionalities of method 200 may be implemented directly by the scriptwhen the script is interpreted. In the illustrated embodiment, method200 commences in block 204 which involves an inquiry as to whether atleast a threshold amount of video data is queued for decoding. In someembodiments, block 204 comprises determining whether a video data queue(for example, video data queue 112 of system 100 (FIG. 2A)) contains atleast one frame of video data that has yet to be decoded.

If the block 204 inquiry determines that there is less than thethreshold amount of video data queued (block 204, NO branch), method 200proceeds to block 206. Block 206 comprises an inquiry into whether allavailable video data has been queued. Block 206 may comprise, forexample, determining whether an end portion of the video segment (forexample, an end portion of a known length video segment or an otherwisediscernable end portion of a video segment) has been placed in the videodata queue. If the block 206 inquiry determines that all available videodata has been queued (block 206, YES branch), method 200 ends.

If the block 206 inquiry determines that there is still unqueued videodata available (block 206, NO branch), method 200 proceeds to block 208.Block 208 involves causing more video data to be placed in the videodata queue. By way of non-limiting illustration, in a particular exampleembodiment, method 200 is implemented as a set of Javascriptinstructions and block 208 comprises invoking the open( ) method of anAJAX XMLHttpRequest object corresponding to video data hosted on aserver. This block 208 functionality requests that the internet browserretrieve some video data in a format that can be interpreted byJavascript. Where possible in the user-computing device, this block 208functionality of retrieving video data can be performed by the internetbrowser as a parallel thread (in a multi-threaded environment) or as aparallel process (in a multiprocessing environment) to that of theremainder of method 200. For example, a script interpreter of theinternet browser can perform one parallel thread/process to implementmethod 200 while the internet browser implements a second parallelthread/process to implement block 208.

In some embodiments, block 208 comprises obtaining only an incrementalamount of video data (for example, by specifying a particular portion orparticular amount of video data to be placed in the video data queue,such as by indicating a byte range in a Range header field of an HTTPrequest, for instance). In such embodiments, block 208 may compriseupdating an index, range or the like that tracks what video data hasbeen requested and/or placed in the video data queue.

After block 208, method 200 proceeds to block 216, which is describedbelow. In some embodiments, method 200 may proceed to block 212 afterblock 208. In some embodiments, block 206 is omitted (for example, if itis determined in block 204 that there is not at least one frame of videodata queued (block 204, NO branch), method 200 may attempt to causevideo data to be queued (for example, perform block 208) withoutdetermining whether there is available video data to be queued).

Returning to block 204, if the block 204 inquiry determines that thereis at least one frame of video data queued (block 204, YES branch),method 200 proceeds to block 212. Block 212 comprises determiningwhether there is sufficient free space (for example, free spacesufficient to store a decoded frame image) in a frame image buffer (forexample, frame image buffer 126 of system 100 (FIG. 2A)). If the block212 inquiry determines that there is not free space in the frame imagebuffer (block 212, NO branch), method 200 proceeds to block 216. If theblock 212 inquiry determines that there is free space in the frame imagebuffer (block 212, YES branch), method 200 proceeds to block 214.

In the illustrated embodiment, block 214 comprises preparing one frameof queued video data into a frame image suitable for rendering (forexample, frame image 124 (FIG. 2A)) and placing the prepared frame imageinto the frame image buffer (for example, frame image buffer 126 (FIG.2A). Block 214 may comprise preparing video data corresponding to (orcomprising) the next un-decoded frame image in a sequence of frameimages, for example. In some embodiments, frame images prepared in block214 comprise images in a format that can be natively rendered by aninternet browser operating on a user-computing device that isinterpreting a script implementing all or part of method 200. By way ofnon-limiting illustration, in a particular example embodiment, method200 is implemented as a set of scripted instructions (for example, a setof Javascript instructions) and block 214 comprises preparing video datainto an ImageData object, which may comprise a CanvasPixelArray objectcontaining an array of RGB pixel values. In another example embodiment,block 214 comprises preparing video data into a frame image in a formatthat can be natively displayed by an internet browser operating on auser-computing device (for example, PNG, JPEG, GIF, etc.).

Block 214 may generally comprise any or any combination of the followingexample operations:

-   -   performing arithmetic and/or logical operations;    -   creating, deleting and/or modifying data structures and/or data        stored therein;    -   performing one or more sets of scripted instructions, accessing        executable libraries natively available to the script        interpreter, etc.;    -   causing the browser to invoke native browser functions (for        example, where queued video data comprises (or can be converted        to) JPEG image data, block 214 may involve causing the browser        to invoke native JPEG rendering functionality of an internet        browser operating on a user-computing device to obtain an array        of RGB pixel values); and/or    -   the like.

In the particular case of the illustrated embodiment, preparation of theframe image in block 214 comprises:

-   -   decoding the video data (for example, video data 114 from video        data buffer 112) in block 214A to generate a decoded frame image        (for example, decoded frame image 140);    -   optionally converting the decoded frame image into a file format        that is natively renderable by the internet browser in block        214B to generate a browser-renderable frame image (for example,        browser-renderable frame image 144);    -   optionally encoding the browser-renderable frame image into a        content transfer format in block 214C to generate a        content-transfer encoded frame image (for example,        content-transfer encoded frame image 146); and    -   optionally creating an frame image object (for example, frame        image object 124) from the frame image in block 214D.

Block 214 may also optionally include image-related processing ofdecoded frame images, such as adjusting contrast, brightness, sharpness,etc.

After block 214, method 200 proceeds to block 216 which involvesscheduling a subsequent iteration of method 200 for a time in thefuture. By way of non-limiting illustration, in a particular exampleembodiment, method 200 is implemented as a set of scripted instructions(for example a set of Javascript instructions) and block 216 comprisesinvoking the setTimeout( ) method to schedule the set of Javascriptinstructions that implements method 200 after a specified amount of timehas elapsed. In another particular example embodiment, method 200 isimplemented as a set of scripted instructions (for example, a set ofJavascript instructions) and the setInterval( ) method may be used toschedule the set of Javascript instructions that implements method 200after a specified amount of time has elapsed. In such embodiments, block216 may not be expressly necessary for each iteration of method 200. Inparticular embodiments, successive iterations of method 200 may bescheduled at intervals less than the frame interval (i.e. (framerate)⁻¹) of the video data being rendered. In some embodiments, thescheduled method 200 intervals are less than 50% of the frame intervalof the video data being rendered. In some embodiments, the scheduledmethod 200 intervals are less than 20% of the frame interval of thevideo data being rendered. In some embodiments, the scheduled method 200intervals are less than 10% of the frame interval of the video databeing rendered. After the next iteration of queuing and decoding method200 is scheduled in block 216, method 200 ends and control is passedback to the internet browser and its script interpreter.

In the illustrated embodiment, in each iteration of method 200 whichinvolves block 214, block 214 comprises preparing a frame of video datafrom its encoded format in the video data buffer (for example, videodata buffer 112) through to a format suitable for rendering (forexample, an frame image object 124 in frame image buffer 126). Thisframe image processing can involve multiple steps including: decoding(block 214A), image format conversion (block 214B), content-transferencoding (block 214C) and image object preparation (block 214D). In somecircumstances (such as where the user-computing device processingresources are relatively limited or slow), the amount of processinginvolved in performing all of these steps is undesirably large.Consequently, in some embodiments, method 200 may be modified so thatsome subset of the steps of blocks 214A, 214B, 214C, 214D is performedfor each iteration of method 200 which reaches block 214. For example,each iteration of method 200 which reaches block 214 may involveperforming only one of blocks 214A, 214B, 214C, 214D. This will reducethe processing time associated with each iteration of method 200.Suitable logic may be defined to select between blocks 214A, 214B, 214C,214D in each iteration. By way of non-limiting example, such logic mayascertain which queue (for example, from among queues 138, 141, 143, 126(FIG. 2A)) has the fewest number of frame images and may select which of214A, 214B, 214C, 214D to perform on this basis.

As discussed above, method 200 may be implemented natively by aninternet browser operating on a user-computing device, when the browserinterprets a cross-platform script (or part of a script). Particularfunctionalities of method 200 may be implemented directly by the scriptwhen the script is interpreted. For example, in particular embodiments,the functionalities of any of blocks 204, 206, 212, 214A, 214B, 214C maybe performed directly by the script when it is interpreted.

FIG. 4 is a flowchart of a method 220 for synchronizing and renderingqueued frame images according to an example embodiment. Method 220 maybe implemented natively by an internet browser operating on auser-computing device, when the browser interprets a cross-platformscript (or part of a script). For example, method 200 may be implementedby set of scripted instructions (for example, a set of Javascriptinstructions). Particular functionalities of method 220 may beimplemented directly by the script when the script is interpreted.

Block 224 of method 220 comprises determining a current frame image tobe rendered. Block 224 may comprise, for example, determining a currentvideo frame index based on a frame rate of the video data being renderedand a current time value. A particular non-limiting embodiment of amethod for determining a current video frame index suitable for use inblock 224 is shown in optional blocks 224A and 224B. Block 224A involvesprocuring a current time value from a suitable source. In theillustrated embodiment, the block 224A current time value is obtainedfrom the rendering of audio data which accompanies the video data withinthe video content. In one non-limiting embodiment, the block 224Acurrent time value is obtained from the rendering of audio data 164 fromwithin video content 116 (see FIG. 2B). As mentioned above, inparticular embodiments, audio renderer interface 180 (FIG. 2B) of audiorendering system 150 may monitor the timing of audio playback by audiorenderer 182 (e.g. relative to a reference point such as the start ofaudio playback or the like) and may be queried in block 224A for acurrent audio playback time reference. In some such embodiments, audiorenderer interface 180 may be implemented directly by the script toprocure the audio playback time reference. In other embodiments, audiorenderer interface 180 may make use of native browser functionalities toprocure the audio playback time reference. In another non-limitingexample embodiment, method 220 is implemented as a set of scriptedinstructions (for example a set of Javascript instructions), and block224A may involve causing the browser to invoke the audio.buffered.endmethod on an associated audio object to obtain a value indicating thetime of the last rendered (or about to be rendered) segment of theassociated audio data. This exemplary embodiment may be implementednatively by the browser and need not rely on audio renderer interface180.

In the illustrated example embodiment, block 224B, which may beimplemented directly by the script, involves multiplying the block 224Acurrent time value (for example, the current audio playback timereference) by the video data frame rate to obtain the desired block 224current video frame index. In some implementations, the product of theblock 224A current time value and the video data frame rate may berounded to the nearest integer to provide the desired block 224 currentvideo frame index. In Javascript-based implementations, where it is notpossible to round up, this block 224B rounding operation may beperformed by adding 0.5 to the product and rounding down to the nearestinteger.

In some internet browsers, it may be the case that audio bufferinginformation is updated less frequently than the frame rate of the videodata being rendered (for example, two or more frame periods may elapsebetween successive updates of the audio buffering information). Toameliorate synchronization issues that may arise from this, block 224may comprise determining an amount of time elapsed since the last timeblock 224 (or another block of method 200) was performed, anddetermining the current block 224 video frame index based on acombination of: this elapsed time; and the block 224 video frame indexdetermined the last time block 224 was performed. This elapsed time maybe measured or otherwise determined from a system clock or the like.

Block 226, which may be implemented directly by the script, comprisesdetermining whether the frame image referenced by the current block 224video frame index has already been rendered. Block 226 may avoidduplicate rendering of the same frame in circumstances where method 220is performed twice within the period of a single video frame. In someembodiments, block 226 comprises comparing the current block 224 videoframe index to the block 224 video frame index determined in a previousiteration of method 220 (for example, the immediately precedingiteration).

If the block 226 inquiry determines that the video frame correspondingto the current block 224 video frame index has already been rendered(block 226, YES branch), method 220 proceeds to block 228. Block 228,which may be implemented directly by the script, comprises determiningwhether the current block 224 video frame index references the lastframe of video data being rendered (for example, the final frame of aknown length video segment). If in block 228 it is determined that thecurrent block 224 video frame index references the last frame in thevideo data being rendered (block 228, YES branch), method 220 ends. Ifthe block 228 inquiry determines that the current block 224 video frameindex does not reference the last frame in the video data being rendered(block 228, NO branch), method 220 proceeds to block 230, which isdescribed below.

Returning to block 226, if the block 226 inquiry determines that thevideo frame corresponding to the current block 224 video frame index hasnot already been rendered (block 226, NO branch), method 220 proceeds toblock 232. Block 232, which may be implemented directly by the script,involves an inquiry into whether the frame image corresponding to thecurrent block 224 video frame index (for convenience, the “current frameimage”) is queued for rendering. Block 232 may comprise determiningwhether the current frame image is present in a frame image bufferpopulated by method 200 (FIG. 3), for example. If the block 232 inquirydetermines that the current frame image is not queued for rendering(block 232, NO branch), method 220 proceeds to block 230. Beforeproceeding to block 230, method 220 may initiate and/or perform one ormore optional dropped frame actions in block 234. By way of non-limitingexample, the block 234 dropped frame action may involve recording thefact that the current frame image was not available for rendering (forexample, for statistical and/or analysis purposes), pausing playback ofan associated audio track (for example, to permit queued frames to catchup to a current frame determined by audio playback), indicating (forexample, to another process, method, or the like) that frame imagesshould be queued more quickly (such as by obtaining video data at afaster rate, decoding frames more often, switching to a lower bitrate orlower frame rate video source, etc.), and/or the like. The block 234drop frame actions may be initiated directly by the script. Performingsome of the possible block 234 drop frame actions may also beimplemented directly by the script. Performing others of the possibleblock 234 drop frame actions may involve the use of one or more nativebrowser functionalities. In some embodiments, optional block 234 maycomprise some logic which may be used to determine whether or not a dropframe action should be initiated. In some embodiments, actions similarto the block 234 drop frame actions may be taken in other circumstanceswhere it is known that a frame is dropped—for example, in circumstanceswhere the block 224 current frame index is more than 1 count greaterthan the last block 224 frame index (from the preceding iteration ofmethod 220) indicating that one or more frames have been dropped betweensuccessive iterations of method 220.

If the block 232 inquiry determines that the current frame image isqueued for rendering (block 232, YES branch), then method 220 proceedsto block 236. Block 236 comprises rendering the current frame image. Inembodiments where method 220 is implemented using a script interpretedby an internet browser operating on a user-computing device, block 236may comprise, for example, rendering the current frame image using anative image rendering functionality of the internet browser. By way ofnon-limiting illustration, in a particular example embodiment, method220 is implemented as a set of scripted instructions (for example a setof Javascript instructions), and block 236 comprises invoking aputImageData method having as (one of) its argument(s) an ImageDataobject, which comprises a CanvasPixelArray object containing an array ofRGB pixel values representing the frame image (for example, frame image124 (FIG. 2A)) to be rendered. In another example embodiment, block 236comprises invoking a drawImage method having as (one of) its argument(s)an image object (for example, frame image 124 (FIG. 2A)).

After block 236, method 220 proceeds to block 230. Block 230 involvesscheduling a subsequent iteration of method 220 for a time in thefuture. In some embodiments, block 230 may comprise the use of one ormore native browser functionalities. By way of non-limitingillustration, in a particular example embodiment, method 220 isimplemented as a set of scripted instructions (for example, a set ofJavascript instructions) and block 230 comprises invoking thesetTimeout( ) method to schedule the set of Javascript instructions thatimplements method 220 after a specified amount of time has elapsed. Inanother particular example embodiment, method 220 is implemented as aset scripted instructions (for example, a set of Javascriptinstructions) and the setInterval( ) method may be used to schedule theset of Javascript instructions that implements method 220 after aspecified amount of time has elapsed. In such embodiments, block 230 maynot be expressly necessary for each iteration of method 220. Inparticular embodiments, successive iterations of method 220 may bescheduled at intervals less than the frame interval (i.e. (framerate)⁻¹) of the video data being rendered. In some embodiments, thescheduled method 220 intervals are less than 50% of the frame intervalof the video data being rendered. In some embodiments, the scheduledmethod 220 intervals are less than 20% of the frame interval of thevideo data being rendered. In some embodiments, the scheduled method 220intervals are less than 10% of the frame interval of the video databeing rendered. After the next iteration of video rendering method 220is scheduled in block 230, method 220 ends and control is passed back tothe script interpreter.

As discussed above, method 220 may be implemented natively by aninternet browser operating on a user-computing device, when the browserinterprets a cross-platform script (or part of a script). Particularfunctionalities of method 220 may be implemented directly by the scriptwhen the script is interpreted. For example, in particular embodiments,the functionalities of any of blocks 224B, 226, 228, 232, 234 may beperformed directly by the script when it is interpreted.

In the illustrated embodiments, method 200 prepares no more than oneframe of video data each time that it is performed, and method 220renders no more than one frame image each time it is performed. Thisimplementation may be advantageous where methods 200 and 220 areimplemented iteratively and asynchronously interpreted by the samescript interpreter of an application program executing in a singlethread of execution (for example, the Javascript interpreter of sometypical internet browsers). For example, such an implementation maypermit method 220 to render frame images decoded by method 200 betweensuccessive iterations of method 200. In other embodiments, multipleframes of video data may be procured and/or prepared in each iterationof method 200 and/or multiple frame images may be rendered in eachiteration of method 220. Also, as discussed above, in some embodiments,one frame image of video data may be partially prepared (for example, asubset of blocks 214A, 214B, 214C, 214D) in each iteration of method200.

In some embodiments, methods 200 and 220 are configured to schedulesubsequent iterations of themselves at regular intervals (for example,the scheduled period between successive iterations may be constantacross iterations). These scheduled intervals may be shorter than themaximum time between successive iterations of methods 200 and 220 thatmay elapse yet still permit video data to be queued, prepared,synchronized and rendered at the frame rate of the video data. This maybe advantageous in embodiments where methods 200 and 220 are implementedby a script that is interpreted by the script interpreter of anapplication program that cannot guarantee that future iterations ofmethods 200 and 220 will occur at their scheduled times (for example,because operation of the interpreter it is pre-empted by other processesrunning on the same thread of execution as the interpreter, becausefuture iterations of methods 200 and 220 are pre-empted by otherscheduled and/or ongoing operations of the interpreter, etc.).Scheduling successive iterations more frequently than would strictly berequired if methods 200 and 220 were running on dedicated threads mayprovide a margin for helping to ensure that methods 200 and 220 areperformed in time to provide video display that is satisfactory to humanobservers.

Methods 200 and 220 may be configured to have the same inter-repetitionperiod, or different inter-repetition periods. In some embodiments,method 200 is configured to be performed more frequently than method220. By way of non-limiting illustration, in a particular exampleembodiment, method 200 is configured to schedule successive iterationsat a predetermined inter-repetition period of between 1 ms and 10 ms,and method 220 is configured to schedule successive iterations at apredetermined inter-repetition period of between 5 ms and 25 ms. Inother embodiments, method 220 may be configured to schedule successiveiterations at a predetermined inter-repetition period of between 1 msand 10 ms.

Inter-repetition periods of methods 200 and/or 220 may be determineddynamically. For example, method 200 and/or method 220 may dynamicallydetermine their inter-repetition periods based on the time actuallyelapsed between successive iterations. For another example,inter-repetition periods of methods 200 and 220 may be coordinated (forexample, method 220 may dictate the inter-repetition period of method200, or vice versa). In some embodiments, one or both of methods 200 and220 may be multiply instantiated, such that there are a plurality of oneor both methods continually scheduling successive iterations ofthemselves (for example, at the same inter-repetition periods or atdifferent inter-repetition periods).

Turning now to audio rendering system 150 (FIG. 2B), in someembodiments, the functionality of audio rendering system 150 isachieved, at least in part, by the script interpreter of an applicationprogram implementing two methods: one method providing the audio dataqueuing and decoding functionalities of system 150 (for example, byimplementing audio data queue monitor 160, decoded audio buffer monitor170 and decoder 172) and another method providing the audio rendererinterface (for example, audio renderer interface 180) for interfacingwith audio renderer 182. FIG. 5 schematically depicts an implementationof this first method for queuing and decoding (or otherwise preparing)audio data according to a particular embodiment. FIG. 6 schematicallydepicts an implementation of this second method for implementing theaudio renderer interface according to a particular embodiment. Thescript interpreter may be caused to repeatedly perform these two methodsin asynchronous fashion to incrementally queue, decode and otherwiseprepare audio data and to interface with audio renderer 182. Suchincremental queuing, decoding and interfacing of audio data with audiorenderer 182 may be advantageous where the methods are implemented in ascript that is interpreted by a single-threaded interpreter.

FIG. 5 is a flowchart of a method 250 for obtaining, decoding andotherwise preparing audio data according to an example embodiment.Method 250 may be implemented natively by an internet browser operatingon a user-computing device, when the browser interprets a cross-platformscript (or part of a script). For example, method 250 may be implementedas a set of scripted instructions (for example, a set of Javascriptinstructions). Particular functionalities of method 250 may beimplemented directly by the script when the script is interpreted. Inmany respects, method 205 may be analogous to the video data queuing,decoding and preparing method 200 of FIG. 3. In the illustratedembodiment, method 250 commences in block 254 which involves an inquiryas to whether at least a threshold amount of audio data is queued fordecoding. In some embodiments, block 254 comprises determining whetheran audio data queue (for example, audio data queue 162 of system 150(FIG. 2B)) contains at least one segment of audio data that has yet tobe decoded. The length of audio segments used in method 250 (and inmethod 270 described below) may comprise a configurable constant (forexample, which may depend on available processing resources at theuser-computing device) or may comprise a dynamically determined variablewhich determined each time that a segment of audio data is used or eachtime that a piece of audio data 164 is rendered. In some embodiments,each audio segment used in methods 250, 270 may comprise a suitablenumber (for example, one) of frame(s) of audio data, although this isnot necessary. In some embodiments, each audio segment used in methods250, 270 may comprise a suitable length (for example, 1 second) ofplayback time. In some embodiments, each audio segment used in methods250, 270 may comprise a suitable number (e.g. 44,000) of audio samples.

If the block 254 inquiry determines that there is less than thethreshold amount of audio data queued (block 254, NO branch), method 250proceeds to block 256 which involves an inquiry into whether allavailable audio data has been queued. Block 256 may comprise, forexample, determining whether an end portion of the audio data has beenstored in the audio data queue. If the block 256 inquiry determines thatall available audio data has been queued (block 256, YES branch), method200 ends. If the block 256 inquiry determines that there is stillunqueued audio data available (block 256, NO branch), method 250proceeds to block 258 which involves causing more audio data to beplaced in the audio data queue. Block 258 may be similar to block 208 ofmethod 200 (FIG. 3), except that audio data (rather than video data) isprocured and that audio data is added to the audio data queue (ratherthan the video data queue).

After block 258, method 250 proceeds to block 266, which is describedbelow. In some embodiments, method 250 may proceed to block 262 afterblock 258. In some embodiments, block 256 is omitted (for example, if itis determined in block 254 that there is not at least one segment ofaudio data queued (block 254, NO branch), method 250 may attempt tocause audio data to be queued (for example, perform block 258) withoutdetermining whether there is available audio data to be queued).

Returning to block 254, if the block 254 inquiry determines that thereis at least one segment of audio data queued (block 254, YES branch),method 250 proceeds to block 262 which involves determining whetherthere is sufficient free space (for example, free space sufficient tostore a decoded segment of audio data) in a decoded audio buffer (forexample, decoded audio buffer 176 of system 150 (FIG. 2B)). If the block262 inquiry determines that there is not free space in the decoded audiobuffer (block 262, NO branch), method 250 proceeds to block 266. If theblock 262 inquiry determines that there is free space in the decodedaudio buffer (block 262, YES branch), method 250 proceeds to block 264.

Block 264 comprises decoding one segment of queued audio data (forexample, from audio data queue 162) and storing the decoded audiosegment in the decoded audio buffer (for example, decoded audio buffer176). Block 264 may comprise decoding audio data corresponding to (orcomprising) the next undecoded segment in an audio track, for example.In some embodiments, audio data decoded in block 264 is provided in aformat that can be natively rendered by an internet browser operating ona user-computing device implementing a native audio renderer 182. By wayof non-limiting illustration, in a particular example embodiment, block264 comprises decoding audio data into .WAV file format or the likewhich is natively renderable by an internet browser operating on auser-computing device. Block 264 may comprise performing the steps ofany suitable decoding algorithm, including (without limitation) thosefunctionalities described above in connection with block 214. Asdiscussed above, audio rendering system 150 (FIG. 2B) may comprise audioprocessing functionalities analogous to those of frame image processor136 (FIG. 2A) which may be used to put decoded audio data into a formatsuitable for rendering. In such embodiments, block 264 may optionally bebroken down to provide such functionalities in a manner analogous tooptional blocks 214A, 214B, 214C, 214D of block 214 (FIG. 3). Referencesto decoding audio data in method 250, decoding block 264 and decoder 172(FIG. 2B) should be understood to optionally include any one or more ofthese functionalities associated with preparing audio data into a formatsuitable for rendering. Block 264 may optionally include audio-relatedprocessing of decoded audio data, such as filtering, volume adjustment,compression, etc.

After block 264, method 250 proceeds to block 266 which involvesscheduling a subsequent iteration of method 250 for a time in thefuture. Block 266 may be similar to block 216 described above.Successive iterations of method 250 are scheduled at intervals less thanthe playback duration of the audio segments used in methods 250, 270.For example, if the audio segments used in methods 250, 270 have aplayback duration of τ, then block 266 may involve scheduling successiveiterations of method 250 at intervals less than 0.5τ. In someembodiments, the scheduled method 250 intervals are less than 0.2τ. Insome embodiments, the scheduled method 250 intervals are less than 0.1τ.After the next iteration of queuing and decoding method 250 is scheduledin block 266, method 250 ends and control is passed back to the scriptinterpreter.

As discussed above, method 250 may be implemented natively by aninternet browser operating on a user-computing device, when the browserinterprets a cross-platform script (or part of a script). Particularfunctionalities of method 250 may be implemented directly by the scriptwhen the script is interpreted. For example, in particular embodiments,the functionalities of any of blocks 254, 256, 262, 264 may be performeddirectly by the script when it is interpreted.

FIG. 6 is a flowchart of a method 270 for method for implementing theaudio renderer interface according to a particular embodiment. Method270 may be implemented natively by an internet browser operating on auser-computing device, when the browser interprets a cross-platformscript (or part of a script). For example, method 270 may be implementedas a set of scripted instructions (for example, a set of Javascriptinstructions). Particular functionalities of method 270 may beimplemented directly by the script when the script is interpreted.Method 270 starts in block 272 which involves and inquiry into whetherthe last segment of audio data has been loaded from the decoded audiobuffer (for example, decoded audio buffer 176 (FIG. 2B)) to the audiorenderer (for example, audio renderer 182 (FIG. 2B)). If the block 272inquiry is positive (i.e. all decoded audio data has been provided tothe audio renderer (block 272, YES branch)), method 270 proceeds toblock 276 via optional block 274 described below. If on the other hand,the block 272 inquiry determines that there is still decoded audio datain the decoded audio buffer to be provided to audio renderer (block 272,NO branch), then method 270 proceeds to block 280.

Block 280 involves an inquiry into whether the audio renderer can acceptmore audio data (for example, whether there is space in the internalbuffer of the audio renderer to accept another segment of audio data).If the block 280 inquiry determines that the audio renderer can notaccept more audio data (block 280, NO branch), method 270 proceeds toblock 276 via optional block 274 described below. Otherwise, if theaudio renderer can accept more audio data (block 280, YES branch),method 270 proceeds to block 282. Block 282 involves an inquiry intowhether there is decoded audio data available in the decoded audiobuffer to be loaded into the audio renderer. If the block 282 inquirydetermines that sufficient decoded audio data is available in thedecoded audio buffer (block 282, YES branch), then method 270 proceedsto block 284 which involves transferring a segment of decoded audio datafrom the decoded audio buffer into the audio renderer. This block 284data transfer may involve formatting the audio data in a format suitablefor use by the audio renderer. After loading audio data into the audiorenderer in block 284, method 270 proceeds to block 276 via optionalblock 274.

Returning to block 282, if the block 282 inquiry determines thatsufficient decoded audio data is not available in the decoded audiobuffer (block 282, NO branch), then method 270 proceeds to block 276 viaoptional blocks 286 and 274. Optional block 286 may involve one or moredrop audio actions, such as: recording the fact that the audio rendererhad capacity to accept more decoded audio data, but that such decodedaudio data was not available in the decoded audio buffer; pausing orslowing down playback of the audio data by the audio renderer (forexample, to permit the decoding and/or queuing of audio data to catch upto the audio renderer), indicating (for example, to another process,method, or the like) that audio data should be decoded and/or queuedmore quickly (such as by obtaining audio data at a faster rate, decodingaudio data more often, switching to a lower bitrate audio source, etc.),and/or the like, for example.

Method 270 may end up at optional block 274 via a variety of paths.Optional block 274 involves procuring a current time value from theaudio renderer. This current time value may comprise a time referenceassociated with the playback of the current segment of audio data. Byway of non-limiting illustration, in a particular example embodimentmethod 270 is implemented as a set scripted instructions (for example, aset of Javascript instructions), and optional block 274 may involveinvoking the audio.buffered.end method on an associated audio object toobtain a value indicating the time of the last rendered (or about to berendered) segment of the associated audio data. The time value obtainedin optional block 274 may be made available to block 224A of method 220(FIG. 4). In some embodiments, block 274 is not required, because thetime value is obtained in block 224A of method 220.

Method 270 eventually proceeds to block 276 which involves an inquiryinto whether the playback of audio data by the audio renderer iscomplete. If the block 276 inquiry is positive (i.e. audio playback iscomplete), then method 270 ends. If, on the other hand, the audioplayback is incomplete (block 276, NO branch), method 270 proceeds toblock 278 which involves scheduling a subsequent iteration of method 270for a time in the future. Block 278 may be similar to block 230 (FIG. 4)described above. Successive iterations of method 270 are scheduled atintervals less than the playback duration of the audio segments used inmethods 250, 270. For example, if the audio segments used in methods250, 270 have a playback duration of τ, then block 278 may involvescheduling successive iterations of method 270 at intervals less than0.5τ. In some embodiments, the scheduled method 270 intervals are lessthan 0.2τ. In some embodiments, the scheduled method 270 intervals areless than 0.1τ. After the next iteration of method 270 is scheduled inblock 278, method 270 ends and control is passed back to the scriptinterpreter.

As discussed above, method 270 may be implemented natively by aninternet browser operating on a user-computing device, when the browserinterprets a cross-platform script (or part of a script). Particularfunctionalities of method 270 may be implemented directly by the scriptwhen the script is interpreted. For example, in particular embodiments,the functionalities of any of blocks 272, 280, 282, 286, 276 may beperformed directly by the script when it is interpreted.

In the illustrated embodiments, method 250 procures and decodes (andotherwise prepares) no more than one segment of audio data each timethat it is performed, and method 270 loads no more than one segment ofaudio data into the audio renderer each time it is performed. Asdiscussed above, the length of such segments may be a configurableparameter which may depend, for example, on available processingresources at the user-computing device. In some embodiments, each audiosegment comprises a frame of audio data. This implementation may beadvantageous where methods 250 and 270 are implemented as iterativelyand asynchronously interpreted by the same script interpreter of anapplication program executing in a single thread of execution (forexample, the Javascript interpreters of some major internet browsers).For example, such an implementation may permit method 270 to load audiodata (decoded by method 250) into the audio renderer between successiveiterations of method 250. In other embodiments, multiple segments ofaudio data may be procured and/or decoded (or otherwise prepared) ineach iteration of method 250 and/or multiple segments may be rendered ineach iteration of method 270. Also, as discussed above, in someembodiments, one segment of audio data may be partially prepared (forexample, a subset of blocks analogous to blocks 214A, 214B, 214C, 214D)in each iteration of method 250.

The scheduling of methods 250, 270 may have characteristics similar tothose of the scheduling of methods 200, 220 discussed above. Scheduleintervals may be constant, dynamic, coordinated, short enough to permitaudio data to be queued, decoded and rendered at the sampling rate ofthe audio data or at a rate suitable for human listeners. Methods 250,270 may be configured to have the same or different inter-repetitionperiods. In some embodiments, method 250 is configured to be performedmore frequently than method 270. In some embodiments, one or both ofmethods 250, 270 may be multiply instantiated, such that there aplurality of one or both methods continually scheduling successiveiterations of themselves (for example, at the same inter-repetitionperiods or at different inter-repetition periods).

As discussed above, in some embodiments, internet browsers can nativelyrender encoded audio data. In such embodiments, suitable modificationscan be made to methods 250, 270 such that the steps associated withdecoding audio data and queuing decoded audio data are not required.

In the embodiment described above in connection with FIGS. 3-6,multi-threaded processing is simulated by scheduling successiveiterations of methods 200, 220, 250, 270 which are performed in turn bya single-threaded interpreter. FIG. 7 is a flow chart of a method 300which may be used to queue, decode and prepare audio and video data, torender video data and to implement an audio renderer interface accordingto another embodiment. Using method 300 involves iteratively schedulingand interpreting successive iterations of the single method 300 codesegment, but incorporating logic into the method 300 code segment todetermine which procedure is performed in each iteration.

Method 300 comprises a logic block 302, which, in the illustratedembodiment, involves a number of logical inquiries 304, 308, 312, 316.In some embodiments, logic block 302 or particular functionalities oflogic block 302 may be implemented directly by the script when thescript is interpreted. Logic block 302 may dictate which procedure isperformed in method 300. For example, in the illustrated embodimentlogic block 302 starts in block 304 which involves an inquiry intowhether conditions are suitable for performing an audio rendererinterface procedure. The block 304 conditions may generally compriseconditions based on any information which may be natively or directlyavailable to the script. For example, the block 304 conditions may bebased on comparing the amount of audio data in the buffer of the audiorenderer to some threshold. If it is determined that the amount of audiodata in the audio renderer buffer is less than some threshold amount,then it may be desirable to perform the audio renderer interfaceprocedure to load more audio data into the audio renderer. The block 304conditions are not limited to conditions that are directly related tothe audio renderer interface or to audio rendering generally. In someembodiments, the block 304 conditions may involve evaluating whethersome other functionality may be in more immediate need. For example, theblock 304 conditions may involve an evaluation of whether it is moreimportant (in the current iteration of method 300) to perform the videodecoding procedure, even if the amount of audio data in the audiorenderer buffer is less than the threshold amount. The block 304conditions may be based on information generated in drop audio block 286(FIG. 6) and/or drop frame block 234 (FIG. 4).

If evaluation of the block 304 conditions determines that conditions aresuitable for performing an audio renderer interface procedure (block304, YES branch), then method 300 proceeds to block 306. Block 306involves performing an audio renderer interface procedure. Such an audiorenderer interface procedure may involve a method similar to that ofmethod 270 (FIG. 6), except that the block 278 scheduling of a futureiteration is not required. After returning from the audio rendererinterface procedure, method 300 proceeds to block 320 which involvesscheduling another iteration of method 300 for a time in the future. Theblock 320 scheduling may be similar to that described above for thescheduling blocks of methods 200, 220, 250, 270. For example, wheremethod 300 is implemented as a set of scripted instructions (forexample, a set of Javascript instructions), block 320 may comprise usingthe setTimeout( ) and/or setInterval( ) methods. The block 320 scheduledintervals may be static or dynamic. The block 320 scheduled intervalsmay be shorter than the maximum time that may elapse yet still permitvideo and audio data to be queued, decoded and/or otherwise prepared andrendered at suitable rates. In some embodiments, the block 320 scheduledintervals are in a range of 0.25 ms-25 ms. In some embodiments, theblock 320 scheduled intervals are scheduled for as soon as possibleafter completion of the current iteration of method 300.

If evaluation of the block 304 conditions determines that conditions arenot suitable for performing an audio renderer interface procedure (block304, NO branch), then method 300 proceeds to block 308. Block 308involves an inquiry into whether conditions are suitable for performinga video renderer procedure. The block 308 inquiry may be similar to theblock 304 inquiry and may be based on any information which may benatively or directly available to the script. By way of non-limitingexample, the block 308 inquiry may be based on evaluating a currentframe index (obtained, for example, in a manner similar to thatdescribed above in block 224 (FIG. 4)) and determining if the currentframe index is greater than the frame index of the last video framerendered. If the current frame index is greater than the last videoframe rendered then it may be desirable to perform the video rendererprocedure to render another frame of video data. As with the block 308conditions described above, the block 308 conditions may involveevaluating whether some other functionality may be in more immediateneed. The block 304 conditions may be based on information generated indrop audio block 286 (FIG. 6) and/or drop frame block 234 (FIG. 4). Ifevaluation of the block 308 conditions determines that conditions aresuitable for performing a video rendering procedure (block 308, YESbranch), then method 300 proceeds to block 310. Block 310 involvesperforming a video rendering procedure. Such a video rendering proceduremay involve a method similar to that of method 220 (FIG. 4), except thatthe block 230 scheduling of a future iteration is not required. Afterreturning from the video renderer procedure, method 300 proceeds toschedule another iteration in block 320.

If evaluation of the block 308 conditions determines that conditions arenot suitable for performing a video renderer procedure (block 308, NObranch), then method 300 proceeds to block 312. Block 312 involves aninquiry into whether conditions are suitable for performing a videoqueuing/decoding procedure. The block 312 inquiry may be similar to theinquiries of blocks 304, 308 and may be based on any information whichmay be natively or directly available to the script. By way ofnon-limiting example, the block 312 inquiry may be based on comparingthe amount of prepared video data in the frame image buffer (forexample, frame image buffer 126 (FIG. 2A)) to a suitable thresholdand/or comparing the amount of video data in the video data queue (forexample, video data queue 112 (FIG. 2A)) to a suitable threshold. Aswith the conditions of blocks 304, 308, the block 312 conditions mayinvolve evaluating whether some other functionality may be in moreimmediate need. The block 312 conditions may be based on informationgenerated in drop audio block 286 (FIG. 6) and/or drop frame block 234(FIG. 4). If evaluation of the block 312 conditions determines thatconditions are suitable for performing a video queuing/decodingprocedure (block 312, YES branch), then method 300 proceeds to block314. Block 314 involves performing a video queuing/decoding procedure.Such a video queuing/decoding procedure may involve a method similar tothat of method 200 (FIG. 3), except that the block 216 scheduling of afuture iteration is not required. After returning from the videoqueuing/decoding procedure, method 300 proceeds to schedule anotheriteration in block 320.

If evaluation of the block 312 conditions determines that conditions arenot suitable for performing a video queuing/decoding procedure (block312, NO branch), then method 300 proceeds to block 316. Block 316involves an inquiry into whether conditions are suitable for performingan audio queuing/decoding procedure. The block 316 inquiry may besimilar to the inquiries of blocks 304, 308, 312 and may be based on anyinformation which may be natively or directly available to the script.By way of non-limiting example, the block 316 inquiry may be based oncomparing the amount of decoded audio data in the decoded audio buffer(for example, decoded audio buffer 176 (FIG. 2B)) to a suitablethreshold and/or comparing the amount of audio data in the audio dataqueue (for example, audio data queue 162 (FIG. 2B)) to a suitablethreshold. As with the conditions of blocks 304, 308, 312, the block 316conditions may involve evaluating whether some other functionality maybe in more immediate need. The block 316 conditions may be based oninformation generated in drop audio block 286 (FIG. 6) and/or drop frameblock 234 (FIG. 4). If evaluation of the block 316 conditions determinesthat conditions are suitable for performing an audio queuing/decodingprocedure (block 316, YES branch), then method 300 proceeds to block318. Block 318 involves performing an audio queuing/decoding procedure.Such an audio queuing/decoding procedure may involve a method similar tothat of method 250 (FIG. 5), except that the block 266 scheduling of afuture iteration is not required. After returning from the audioqueuing/decoding procedure, method 300 proceeds to schedule anotheriteration in block 320.

In the illustrated embodiment, if evaluation of the block 316 conditionsdetermines that conditions are not suitable for performing a videoqueuing/decoding procedure (block 316, NO branch), then method 300proceeds along one of two optional paths. In some cases, the block 316NO branch may cause method 300 may loop back to block 304. In othercases, the block 316 NO branch may cause method 300 to proceed toschedule another iteration in block 320. In other embodiments, the block316 NO branch may lead method 300 to another functional block (notshown) which may involve selecting one of the procedures (for example,blocks 306, 310, 314, 318). Such a selection may be based on which ofthe conditions of blocks 304, 308, 312, 316 is closest to the positiveresult. In still other embodiments, block 316 is not required and theblock 312 NO branch may lead directly to block 318. In such embodiments,the block 318 audio queuing/decoding procedure is the default procedure.In other embodiments, the logic of logic block 302 could be constructedsuch that one of the other procedures (for example, one of blocks 306,310, 314) is the default procedure.

In some circumstances, a particular functional block of methods 200,220, 250, 270, 300 may take an unduly long period of time which maycause rendering artefacts. For example, a processor intensive functionalblock of method 200 (FIG. 3) is block 214 which involves preparing aframe of video data. Block 214 may be particularly processor intensiveif all of the functionalities of blocks 214A, 214B, 214C, 214D arelumped into block 214. In some circumstances, particularly on deviceswith relatively little processing capacity, the time required forpreparing a frame of video data in block 214 may be longer than theinter-frame interval (i.e. (frame rate)⁻¹) of the associated video data.In such circumstances, video frames could be skipped or lost because theprocessor is working on decoding a frame of video data in block 214 whenit might otherwise have been rendering a frame of video data, resultingin video artefacts.

In some embodiments, methods 200, 220, 250, 270, 300 may be parsed orsub-divided into sub-components (for example, functional sub-blocks orsub-steps) and functionalities related to video and/or audio rendering(for example, video rendering method 220 and/or audio renderinginterface method 270) may be performed between such sub-components.Continuing with the example of video preparation block 214, videopreparation block 214 may be sub-divided into a number ofsub-components, which may comprise sub-components 214A, 214B, 214C, 214Dor which may comprise other (illustrated or non-illustrated)sub-components. In some embodiments, sub-components 214, 214B, 214C,214D may themselves be sub-divided into further sub-components. Afterparticular sub-components of block 214, conditions may be evaluated todetermine whether block 214 should be interrupted to perform a procedurerelated to video and/or audio rendering (for example, video renderingmethod 220 and/or audio rendering interface method 270). Such interruptconditions may be similar to those conditions described above for blocks304, 308, 312, 316 and may generally be based on any information whichmay be natively or directly available to the script. For example, theinterrupt conditions associated with performing a video renderingprocedure may be similar to those of block 308 and the interruptconditions associated with performing an audio renderer interfaceprocedure may be similar to those of block 304. If such interruptconditions are evaluated to be positive, then video decoding block 214may be interrupted and the appropriate video rendering procedure and/oraudio renderer interface procedure may be performed. After performingthis procedure, video decoding block 214 may be resumed. Performing suchfunctionalities between the sub-components of video decoding block 214may help to reduce rendering artefacts.

Sub-dividing methods 200, 220, 250, 270, 300 into sub-components andperforming functionalities related to video and/or audio renderingbetween such sub-components is not limited to the example of block 214described above. Methods 200, 220, 250, 270, 300 (and/or any suitableillustrated or non-illustrated blocks or steps of methods 200, 220, 250,270, 300) may be sub-divided in any suitable manner into any suitablesub-components.

As discussed above, in particular non-limiting example embodiments,block 208 of method 200 (FIG. 3) and block 258 of method 250 (FIG. 5)may involve invoking the open( ) method of an AJAX XMLHttpRequest objectcorresponding to video content hosted on a server. This block 258functionality requests that the internet browser retrieve some videoand/or audio data in a format that can be interpreted by Javascript. Insome embodiments, block(s) 208 and/or 258 (and their correspondingmethod(s) 200, 250) may make use of multiple AJAX XMLHttpRequest(hereinafter AJAX) objects which may be used iteratively to increase theefficiency of block(s) 208 and/or 258.

FIG. 8 shows a flow chart of a method 350 which may be used to implementthe video data fetching functionality of block 208. Block 258 may beimplemented in a similar manner. In the illustrated embodiment, method350 involves the use of two AJAX objects. It will be appreciated,however, that method 350 may be extended to use more than two AJAXobjects. Method 350 starts in block 352 which involves an inquiry intowhether the first AJAX object (AJAX_1) was used in the last iteration ofmethod 350. If the block 352 inquiry is positive (block 352, YESbranch), then method 350 proceeds to block 354. In block 354, the secondAJAX object (AJAX_2) is used to fetch the next set of data. Dataretrieved by AJAX_2 is stored in a data structure managed natively bythe internet browser (or other application program) which provides theAJAX_2 object. If the block 352 inquiry is negative (block 352, NObranch), then method 350 proceeds to block 356. In block 356, the AJAX_1is used to fetch the next set of data. Data retrieved by AJAX_1 isstored in a data structure managed natively by the internet browser (orother application program) which provides the AJAX_1 object. Method 350ends after implementing block 354 or block 356.

In some embodiments, the data retrieval functionality of block 208(including method 350) may be performed by natively the internet browserunder the direction of the script. In some embodiments, the dataretrieval functionality of block 208 (including method 350) may beperformed as a parallel thread (in a multi-threaded environment) or as aparallel process (in a multiprocessing environment) to that of theremainder of method 200. For example, in some embodiments, an internetbrowser can perform one parallel thread/process (involving a scriptinterpreter, for example) to implement method 200 and can perform asecond parallel thread/process (involving AJAX objects, for example) toimplement method 350. Using multiple AJAX objects in method 350 may alsotake advantage of user-computing devices capable of implementingmultiple-threaded and/or multiprocessing environments. For example, athread or process may be assigned to each of the multiple AJAX objects.

When the script interpreter of an internet browser is interpreting ascript, its memory management procedures may be relatively inefficient.This is particularly the case for so-called “garbage collection”, whichis used to free up previously allocated memory that is no longer in use.Garbage collection can be particularly inefficient, can consumeprocessing resources and can occur at undesirable times—for example, attimes when it is desired to render a frame image or a next segment ofaudio. Using method 350, the multiple AJAX objects can be used as a typeof “round robin” buffer which can avoid the need for intermediatebuffering of the encoded video data using memory allocated by the scriptinterpreter of internet browser. Where only a single AJAX object isused, it may be necessary or desirable to copy fetched data strings fromthe AJAX object into an intermediate buffer managed by the scriptinterpreter of the internet browser. Such intermediate buffering may benecessary or desirable to free up the single AJAX object, so that it canbe used to fetch more data. Such intermediate buffering can be avoidedby using multiple AJAX objects, because one of the AJAX objects can beused to fetch data, while the data from any other AJAX objects can beused to provide data as required by the script implementing the rest ofmethod 200. In addition to using fetched data directly from the multipleAJAX objects, the functionality of the browser responsible forimplementing the AJAX objects can manage the creation/destruction ofdata which can be more efficient than the creation/destruction of databy the browser's script interpreter.

Also, in some circumstances data accessed via the internet or via someother network may have a per-connection bandwidth limit. In suchcircumstances, the use of multiple AJAX objects may enable data to bestreamed faster.

In embodiments implemented in scripts other than Javascript, similarmethods and similar objects may be used to fetch video and/or audiodata. In such embodiments, multiple data fetching objects may be used ina manner similar to the use of multiple AJAX objects described herein.

In some embodiments, video content may be encoded using techniques thatcan be helpful to efficiently render the video content using a suitablescript.

Some internet browsers only accept data having particular data formats(referred to as content-transfer formats) when such data is transferredfrom or otherwise passed by a script interpreter. For example, somebrowsers only read so called base64 encoded data formats when such datais transferred or otherwise passed to the browser by a Javascriptinterpreter. As discussed above, content-transfer encoder 145 of videorendering system 100 (FIG. 2A) may optionally convert frame images to abase64 (or other content-transfer) encoded format in optional block 214Cof method 200 (FIG. 3). This content-transfer encoding can be acomputationally expensive process at the user-computing device. Forexample, in the particular case of base64 encoding, suchcontent-transfer encoding involves inspecting each set of 3 bytes andconverting each set of 3 bytes into 4 characters. Such computationalexpense can lead to rendering artefacts—for example, in circumstanceswhere such content-transfer encoding might delay the rendering of videoframes by a period longer than the inter-frame period dictated by thedesired frame rate.

In accordance with some embodiments, frame images of video data (and/orsegments (for example, frames) of audio data) may be pre-encoded in abase64 (or some other suitable content-transfer format)—for example,prior to being provided to (or retrieved by) the user-computing device).The description that follows refers to the pre-encoding of frame imagesof video data into base64 or some other suitable content-transferformat, without loss of generality that such pre-encoding could alsoapply to audio data. This pre-encoding of frame images into base64 (orother suitable content-transfer) format is particularly useful where theunderlying frame images of video data are represented in a format thatcan be natively rendered by the internet browser (for example, when theunderlying frame images of video data are represented in JPEG or GIFformat). In such cases, the processes of frame image conversion andcontent-transfer encoding (blocks 214B, 214C of method 200 (FIG. 3)) maybe skipped, since the frame images (once decoded in block 214A) arealready in a format that is suitable for transfer to, and rendering by,the internet browser. In such cases, frame image converter 142 andcontent-transfer encoder 145 of video rendering system 100 (FIG. 2A) maybe similarly omitted. In some embodiments, the underlying frame imagesof video content may be transcoded into a format that can be nativelyrendered by the internet browser (for example, JPEG or GIF format) andthen the transcoded frame images can be pre-encoded into a suitablecontent-transfer format. While such pre-encoding of the frame imagesinto base64 (or other content-transfer) format may increase the size ofencoded video content file(s), any increase in file size may haverelatively little impact on the speed at which encoded files may bestreamed to user-computing device(s), because of the compressibility ofbase64 (or other content-transfer) encoded data. Many data compressiontechniques supported by HTTP 1.1 (for example, gzip, deflate and/or thelike) can take advantage of the fact that base64 (or othercontent-transfer) encoded data uses a limited character set (forexample, 64 characters and a number of control characters in the case ofbase64).

This technique of pre-encoding frame images of video data (and/or framesof audio data) may decrease the consumption of processor resources atthe user-computing device. More particularly, if frame images arepre-encoded into base64 or other suitable content-transfer format, theycan be passed directly to an internet browser at the user-computingdevice without being converted or otherwise encoded in base64 format bythe script at the user-computing device.

In some embodiments, where the frame images underlying the video contentare pre-encoded into base64 format or into some other suitablecontent-transfer format, the data strings corresponding to the image arepadded, so that the data string corresponding to each frame image hasthe same length. For example, in base64 the data strings correspondingto frame images may be padded with a suitable character, such as theline feed character <LF>. Such padding does not increase transfer speedsignificantly, because padded strings are relatively compressible.However, this padding of frame images can cause the script interpreterof the internet browser to reuse memory without reallocation andcorresponding “garbage collection”.

More specifically, without padding, each frame image will have adifferent length. The browser's script interpreter will typicallyallocate some memory at the user-computing device for storage of frameimages. By way of non-limiting example, such frame image storage may beused to implement any of the frame image queues (for example, queues126, 143, 141, 138 (FIG. 2A)). When it comes time to re-use some of theallocated memory to handle a new frame, if the size of the new frame isdifferent from the size of the previous frame that is going to beoverwritten, the script interpreter may decide that it needs to destroythe previous allocation and re-allocate memory to accommodate the newframe. The destruction and re-allocation of previously allocated memoryis commonly referred to as “garbage collection”. Such destruction andre-allocation of previously allocated memory can consume processorresources and lead to artefacts. In contrast, if all of the frames arethe same size, then the script may overwrite the previous frame with thenew frame inside of the previously allocated memory—without destroyingthe previous memory allocation or otherwise causing a memoryre-allocation. This can reduce the consumption of processor resourcesassociated with memory re-allocation and reduce the occurrence ofrendering artefacts.

Currently, all internet browsers of interest natively support at leasttwo image encoding file formats: JPEG and GIF. In particularembodiments, video content can be encoded with the frame images of thevideo content having a plurality of different encoding file formats.Video content may be encoded wherein the individual frame images areencoded in two or more different image encoding file formats (forexample, JPEG and GIF). More particularly, during the encoding process,the encoding file format for each frame image may be selected based onthe visual characteristics or content of the frame image. For example,GIF may be desirable for encoding frame images wherein the visualcharacteristics include sharp edges and details—for example, imagesdisplaying textual information (credit screens, title screens, etc.),cartoon images and/or the like. JPEG may be better suited for frameimages incorporating more natural visual content (for example, withoutsuch sharp edges).

In some embodiments, individual frame images within a particular videocontent element may be processed to determine whether they might bebetter encoded in a JPEG file format or a GIF file format. For example,the values (e.g. luminosity and/or chromaticity values) associated withthe individual pixels of each frame may be compared to the valuesassociated with their adjacent pixels to determine one or more gradientmetrics. In one embodiment, the group of adjacent pixels for aparticular non-edge pixel may comprise its 8 neighboring pixels,although other groups of adjacent pixels could be used in otherembodiments. In one example embodiment, the gradient metrics may bebased on the differences in pixel values. The gradient metrics for allof the pixels in a particular frame image may then be analyzed todetermine whether the particular frame image should be encoded in a JPEGor GIF file format. For example, if there are a relatively large numberof relatively high gradient metrics, then this may be indicative of anframe image with sharp edges which should be encoded in a GIF formatand, on the other hand, if there are a relatively large number ofrelatively low gradient metrics, then this may be indicative of an frameimage that should be encoded in a JPEG file format. In one particularembodiment, this analysis of gradient metrics may be effected by binningthe gradient metrics (to form a notional histogram or the like) and thencomparing the numbers of gradient metrics in each bin to one or moresuitable thresholds.

In some circumstances, it may be ascertained that the internetbrowser(s) of a user-computing device of interest are capable ofnatively rendering additional image encoding file formats. In suchcircumstances, such additional image encoding file formats may beincorporated into the encoding process. That is, video content may beencoded wherein the individual frame images within a particular videocontent element are encoded in 3 or more different image encoding fileformats.

Encoding video content with individual frame images having differentencoding file formats can permit improved compression (relative toencoding the frame images in a single file format), which can in turnlead to video content being procured and/or decoded more efficiently atthe user-computing device and correspondingly fewer rendering artefacts.

In particular embodiments, the quantization tables used to encode frameimages into the JPEG format (for example, the luminosity andchromaticity quantization tables) may be manipulated on a frame by framebasis in accordance with the visual content of each frame image. In someembodiments, the pixel values of each frame image may compared to thoseof either or both of its temporally adjacent frame images (for example,on a pixel-by-pixel basis) to determine one or more difference metric(s)and the quantization table(s) used to encode the frame image may bedetermined on the basis of such difference metric(s). For example, if itis determined that the chromaticity of a particular frame image does notdiffer significantly from the chromaticity of its adjacent frames (i.e.the chromaticity difference metric is low), then this may be indicativeof a relatively slow moving scene, allowing the use of a chromaticityquantization table corresponding to a relatively high level ofcompression for that particular frame image. In contrast, if thechromaticity difference metric for the particular pixel is relativelyhigh, then this may be indicative of a relatively fast moving scene,suggesting the use of a chromaticity quantization table corresponding toa relatively low level of compression for the particular frame image.Similar adjustment is possible for the luminosity quantization table.

The manipulation of the JPEG quantization tables for encoding frameimages at the encoding side can help to achieve high compression withoutoverly sacrificing human-perceptible details. Greater compression of theframe images can result in the use of less computational resources todecode and render the frame images at the user-computing device, whichcan in turn result in fewer rendering artefacts.

Some user-computing platforms do not support fetching of portions ofvideo content files—they are only able to download (or otherwiseprocure) complete video content files. By way of non-limiting example,some mobile phone devices which run the Android™ operating systemcurrently have this limitation. In some embodiments, a single videocontent file may be parsed into a series of chunks and each chunk may beencoded as if it were a complete video content file. This will allow theuser-computing device to separately download (or otherwise procure) eachchunk and the script, being interpreted at the user-computing device,can then be configured to organize the chunks together in order at theuser-computing device to render the complete video content file. A listmay be employed at the user-computing device to organize the smallervideo content files in order.

Typically, although without limitation, video data is encoded at a framerate of 24 frames/second or 33 frames/second. In some circumstances, itis anticipated that there will be insufficient processing resourcesavailable at the user-computing device to enable a script as describedherein to support rendering of video data at these or other desiredframe rates. Accordingly, in some embodiments, the video data may bedown-sampled and re-encoded at a lower frame rate and, when thedown-sampled video data is decoded at the user-computing device,available frame images may be displayed normally and, at times betweenavailable frame images, interpolated frame image may be drawn using analpha blending technique. Such interpolation techniques are not limitedto circumstances where the video data is down-sampled prior to encoding.In some embodiments, it may be determined at the user-computing devicethat there are insufficient processing resources to render video data ata desired frame rate, in which case the video data may be effectivelydown-sampled at the user-computing by selecting to decode and display asubset of the available image frames and, at times between the selectedframe images, interpolated frame image may be drawn using an alphablending technique. Examples of such processes are shown schematicallyin FIGS. 9A and 9B.

FIGS. 9A and 9B show an example where original video data 400 is has aframe rate l/t_(o), where t_(o) represents the frame interval and f₀,f₁, f₂, f₃ . . . represent the original frame images (for example, thepixel values of the individual pixels in the frame images). In each ofFIGS. 9A and 9B, original video data 400 is down-sampled with a lowerframe rate than original video data 400. As mentioned above, suchdown-sampling can be done prior to making the video data available tothe user computing device; or such down-sampling can occur at theuser-computing device by selecting a particular subset of the frameimages from within the video data to decode and process. In the FIG. 9Aexample, original video data 400 is down-sampled by taking every secondframe (f₀, f₂, f₄, f₆ . . . ) such that the re-encoded video data 402has a frame rate l/t_(A) which is half of the frame rate l/t_(o) oforiginal video data 400. In the FIG. 9B example, original video data 400is down-sampled by taking every third frame (f₀, f₃, f₆, f₉ . . . ) suchthat the re-encoded video data 404 has a frame rate l/t_(B) which is ⅓of the frame rate l/t_(o) of original video data 400. It will beappreciated by those skilled in the art that the examples of FIGS. 9Aand 9B are merely explanatory and the original video data 400 maygenerally be down-sampled by taking any suitable fraction of theoriginal frame images f₀, f₁, f₂, f₃ . . . .

An advantage of the down-sampled video data 402, 404 in the embodimentsof FIGS. 9A and 9B is that the user-computing device need only decodeand prepare correspondingly fewer frames of image data. For example, inthe case of FIG. 9A down-sampled video data 402, video decoder 122 andframe image processor 136 (see FIG. 2A) may only need to process half asmany frame images in blocks 214A, 214B, 214C, 214D (see FIG. 3). Such areduced amount of frame image decoding and/or preparation may reduce theburden on the user-computing device processing resources. In someembodiments, however, it may be desirable to render frame images (forexample, by frame image renderer 132 (FIG. 2A) in block 236 (FIG. 4)) atthe original frame rate l/t_(o), as this will give the appearance offluidly moving video. In such embodiments, it can be desirable to renderinterpolated frame images at times between the image frames ofdown-sampled video data 402, 404. For example, in the case ofdown-sampled video data 402 of FIG. 9A, it can be desirable to renderinterpolated frame images at times t₁, t₃, t₅ . . . even thoughdown-sampled video data 402 does not include decoded frame imagescorresponding to these times. Similarly, in the case of down-sampledvideo data 404 of FIG. 9B, it can be desirable to render interpolatedframe images at times t₁, t₂, t₄, t₅ . . . even though down-sampledvideo data 404 does not include decoded frame images corresponding tothese times.

In some embodiments, such interpolation can be provided by creatingimage objects using alpha blending. Such alpha blended image objects maybe created in block 148 (FIG. 2A) and block 214D (FIG. 3), for example.In the case of one particular embodiment, the image object created canbe the argument of a canvas tag, for example. FIG. 9C shows a method 420for creating such alpha-blended image objects according to a particularembodiment. Method 420 commences in block 422 which involves an inquiryinto whether an exact frame is available for the current frame index(for example, the frame index determined in block 224 (FIG. 4)). Ifthere is an exact frame available (block 422, YES branch), then method420 proceeds to block 424 which involves creating an image object basedon the exact frame. In the case of the example embodiment ofdown-sampled data 402 (FIG. 9A), method 420 is able to create imageobjects using the exact frames for frames f₀, f₂, f₄, f₆ . . . at timest₀, t₂, t₄, t₆ . . . and in the case of the example embodiment ofdown-sampled data 404 (FIG. 9B), method 420 is able to create imageobjects using the exact frames for frames f₀, f₃, f₆ . . . at times t₀,t₃, t₆ . . . . This is shown schematically in FIG. 9A as data to bedrawn 406 and in FIG. 9B as data to be drawn 408. Method 420 ends aftercreating the image object in block 424.

Returning to block 422, if the block 422 inquiry determines that thereis no exact frame available for the current frame index (block 422, NObranch), then method 420 proceeds to block 426 which involvesdetermining an alpha-blending coefficient. In general, the block 426alpha-blending coefficient α may be provided by:α=[β+1−mod(f#,β)]⁻¹where:

-   -   α is the desired alpha-blending coefficient;    -   β is the effective down-sampling factor or, equivalently, the        number of rendering times between available image frames+1 (for        example, β=2 for FIG. 9A and β=3 for FIG. 9B);    -   f# is the current frame index; and    -   mod(x,y) is the modulo operator which returns the whole number        remainder of x divided by y.

Using this formula for the example of FIG. 9A, α=0.5 for f₁, f₃, f₅ . .. and for the example of FIG. 9B, α=0.33 for f₁, f₄, f₇ . . . and α=0.5for f₂, f₅, f₈ . . . . In general, the above equation is suitable fordetermining the alpha-blending coefficient for any down-sampling factorβ. After block 426, method 420 proceeds to block 428 which involvescreating an image object by alpha-blending a fraction of the nextavailable image frame onto the image object of the previous image frame.The fraction of the next available image frame is determined by theblock 426 alpha-blending coefficient. So, for example, for frame f₁ inthe example of FIG. 9A, where α=0.5, the next available image frame isf₂ and the image object for the previous frame is f₀, block 428 involvescreating an image object by alpha blending 0.5 f₂ onto the previousimage object (f₀), which creates f₁=0.5 f₂+0.5 f₀. Similarly, for framef₃ in the example of FIG. 9A, where α=0.5, the next available frame isf₄ and the image object for the previous frame is f₂, block 428 involvescreating an image object by alpha blending 0.5 f₄ onto the previousimage object (f₂), which creates f₃=0.5 f₄+0.5 f₂. This is shownschematically in FIG. 9A as data to be drawn 406. For image

For frame f₁ in the example of FIG. 9B, where α=0.33, the next availableimage frame is f₃ and the image object for the previous frame is f₀,block 428 involves creating an image object by alpha blending 0.33 f₃onto the previous image object (f₀), which creates f₁=0.33 f₃+0.67 f₀.For the frame f₂ in the example of FIG. 9B, where α=0.5, the nextavailable image frame is f₃ and the image object for the previous frameis f₁=0.33 f₃+0.67 f₀, block 428 involves creating an image object byalpha blending 0.5 f₃ onto the previous image object (f₁=0.33 f₃+0.67f₀), which creates f₃=0.5 f₃+0.5 (0.33 f₃+0.67 f₀)=0.67 f₃+0.33 f₀. Forthe frame f₄ in the example of FIG. 9B, where α=0.33, the next availableimage frame is f₆ and the image object for the previous frame is f₃,block 428 involves creating an image object by alpha blending 0.33 f₆onto the previous image object (f₃), which creates f₄=0.33 f₆+0.67 f₃.For the frame f₅ in the example of FIG. 9B, where α=0.5, the nextavailable image frame is f₆ and the image object for the previous frameis f₄=0.33 f₆+0.67 f₃, block 428 involves creating an image object byalpha blending 0.5 f₆ onto the previous image object (f₄=0.33 f₆+0.67f₃), which creates f₄=0.5 f₆+0.5 (0.33 f₆+0.67 f₃)=0.67 f₆+0.33 f₃. Thisis shown schematically in FIG. 9B as data to be drawn 408.

Method 420 ends after creating each image object in block 428. Theprocess of method 420 (FIG. 9C) can be implemented in each iteration ofmethod 200 (FIG. 3), for example in block 214, to interpolate frameimages where frame images are not available because of down-sampling atthe encoder side or effective down-sampling at the user-computingdevice. This can enable the user-computing device to render frame imagesat a desirable frame rate while reducing the load on processor resourcesat the user-computing device and, possibly, leading to fewer videoartefacts.

In particular embodiments, the script, when interpreted, causes theuser-computing device to access video content from a server or the likeusing the HTTP protocol. Unlike streaming media which may take advantageof relatively sophisticated protocols to tailor the video content to aparticular user-computing device, a particular media player applicationand/or a particular streaming network connection speed (bitrate), HTTPservers using the HTTP protocol to transfer data typically haverelatively limited capability for interaction with the user-computingdevice. In some embodiments, the script, when interpreted, determinescharacteristics of the user computing device, the internet browserand/or the network connection between the server and the user-computingdevice and takes appropriate action to tailor the rendering of the videocontent.

FIG. 10 shows a method 450 for rendering video content wherein thescript, when interpreted, tailors the rendering of the video contentbased on one or more characteristics of the user-computing device and/orthe network connection between the server and the user-computing device.Method 450, or portions thereof, may be implemented directly by thescript. Method 450 starts in block 452 which involves querying initialdevice characteristics. Such device characteristics may includecharacteristics of the device hardware and/or software operating on thedevice (including the internet browser and/or the operating systemsoftware). Non-limiting examples of device characteristics include:processor speed and/or processing capacity; display characteristics(e.g. display resolution, display orientation, aspect ratio, screen sizeand/or the like); the presence of specialized hardware (e.g. specializedaudio rendering hardware and/or video rendering hardware); softwarecharacteristics of the internet browser or other application programwhich interprets the script (such as capability of the internet browserto natively render particular audio formats and/or natively renderparticular image file formats); software characteristics of the device'soperating system; file handling capabilities (such as whether thedevice, the device's operating system and/or the device's internetbrowser can accommodate the entirety of the video content as a singlefile or whether the video content must be parsed into a plurality ofsmaller files); and/or the like.

Once these device characteristics have been determined, the script, wheninterpreted, uses the device characteristics obtained in block 452 toinitialize the rendering characteristics for the particular device inblock 454. Initializing particular rendering characteristics in block454 may involve selecting appropriate file(s) for downloading from aserver. This may be the case, for example, where it is determined that aparticular user-computing device needs to have the video content parsedinto smaller files, where the native audio rendering capabilities of theuser-computing device or its browser suggest the use of particular videocontent file(s), where the native image rendering capabilities of theuser-computing device or its browser suggest the use of particular videocontent file(s), where the resolution and/or screen size of the displayof the user device suggest the use of particular video content file(s),where knowledge of the user-computing device processor indicates thatdown-sampled video content file(s) should be used and/or the like.Initializing other rendering characteristics in block 454 may involvekeeping track of particular information for subsequent rendering. Thismay be the case, for example, with rendering characteristics such asscreen size, display orientation (aspect ratio) and/or the like.

Method 450 then proceeds to block 456 which involves beginning therendering process according to any of the methods described previously.In block 456, the script, when interpreted, may attempt to procureappropriate video content file(s) based on the block 454 initializedrendering characteristics. Additionally or alternatively, in block 456the script will cause the video content of any procured video contentfile(s) to be rendered based on the block 454 initialized renderingcharacteristics. By way of non-limiting example, in cases where thedisplay of the user-computing has a certain resolution or screen size,the script will scale the image frames to best fit the display of theuser computing device; in cases where the video data is down-sampledprior to being received at the user-computing device, the script willinterpolate between known image frames; in cases where the video data isreceived at a particular frame rate, but the processor of theuser-computing device can not decode and prepare image framessufficiently fast, the script will effectively down-sample the videodata at the user-computing device by selecting a subset of the imageframes to decode and prepare and will interpolate between selected imageframes; and/or the like.

From time to time, the script, when interpreted, will query the ongoingdevice characteristics in block 458. This block 458 query may be similarto the block 452 initial query, except that block 458 may inquire as towhether something has changed from the block 452 initial query. By wayof non-limiting example, potential changes could involve a change in theorientation of the device display and the corresponding aspect ratio ofimage frames to be displayed. In some circumstances, block 548 mayinvolve acquiring information from the drop video action in block 234(FIG. 4) and/or the drop audio action in block 286 (FIG. 5). Forexample, if the block 458 query determines that over a threshold numberof image frames have been dropped, then it may be concluded that thecapacity of the user-computing device processor is insufficient tohandle full frame rate video data and that the appropriate video contentfile(s) should possibly be changed to down-sampled file(s) or that thevideo data should be effectively down-sampled at the user computingdevice by selecting a suitable sub-set of the full rate video frames.

Also, from time to time, the script, when interpreted, will query theongoing network characteristics between the server and theuser-computing device in block 460. If the available bandwidth orbitrate between the server and the user-computing device is too low toensure that the video content arrives at the user-computing device intime to be decoded and rendered, then it may be desirable to switch tolower quality video file(s), such as file(s) with down-sampled videodata, file(s) with lower resolution and/or the like.

Block 462 involves updating the rendering characteristics based on theinformation obtained from block 458 and 460. For example, on the firstiteration, block 462 may involve updating the block 454 initializedrendering characteristics based on the information obtained from block458 and 460. In subsequent iterations, block 462 may involve updatingthe previous block 462 rendering characteristics. Method 450 thenproceeds to block 464 which involves continuing to render the videocontent. Block 464 may be similar to block 456 described above, exceptthat block 464 makes use of the rendering characteristics updated inblock 462. As discussed above, the updated block 462 renderingcharacteristics (based on the queries of blocks 458 and 460) may lead tochanges in the file(s) obtained for rendering (for example. higher orlower quality video files) or in the rendering of the video contentgenerally (for example, scaling to accommodate display orientation).These changes may be implemented in block 464.

Method 450 then proceeds to block 466 which involves an inquiry as towhether the rendering of video content has finished. If so (block 466YES branch), then method 450 ends. If there is more video content to berendered (block 466 NO branch), then method 450 loops back to block 458to repeat the process of querying device characteristics and updatingthe rendering characteristics from time to time.

Embodiments of the present invention include various operations, whichare described herein. Unless otherwise specified, these operations maybe performed by hardware components, software, firmware, or acombination thereof.

Certain embodiments may be implemented as a computer program productthat may include instructions stored on a machine-readable medium. Theseinstructions may be used to program a general-purpose or special-purposeprocessor to perform the described operations. A machine-readable mediumincludes any mechanism for storing information in a form (for example,software, processing application) readable by a machine (for example, acomputer). The machine-readable medium may include, but is not limitedto, magnetic storage medium (for example, floppy diskette); opticalstorage medium (for example, CD-ROM); magneto-optical storage medium;read-only memory (ROM); random-access memory (RAM); erasableprogrammable memory (for example, EPROM and EEPROM); flash memory; oranother type of medium suitable for storing electronic instructions.

Additionally, some embodiments may be practiced in distributed computingenvironments where the machine-readable medium is stored on and/orexecuted by more than one computer system. In addition, the informationtransferred between computer systems may either be pulled or pushedacross the communication medium connecting the computer systems. Methodsindicated as a single series of process steps my have one or moresubsets of the steps executed on a corresponding one or more computerprocessors that then communicate interim results or the availability ofresults among the computer processors using interprocess communication,for example. Data values may be stored in cache memory residing inproximity to the CPU or by addressing computer main memory throughmemory management hardware or even by such memory management hardwarecausing data to be stored on an external storage device to be loadedinto computer main memory.

Computer processing components used in implementation of variousembodiments of the invention include one or more general-purposeprocessing devices such as a microprocessor or central processing unit,a controller, graphical processing unit (GPU), cell computer, or thelike. Alternatively, such digital processing components may include oneor more special-purpose processing devices such as a digital signalprocessor (DSP), an application specific integrated circuit (ASIC), afield programmable gate array (FPGA), or the like. In particularembodiments, for example, the digital processing device may be a networkprocessor having multiple processors including a core unit and multiplemicroengines. Additionally, the digital processing device may includeany combination of general-purpose processing device(s) andspecial-purpose processing device(s).

Although the operations of the method(s) herein are shown and describedin a particular order, the order of the operations of each method may bealtered so that certain operations may be performed in an inverse orderor so that certain operation may be performed, at least in part,concurrently with other operations. In another embodiment, instructionsor sub-operations of distinct operations may be in an intermittentand/or alternating manner.

Where a component (for example, a software module, processor, assembly,device, circuit, etc.) is referred to above, unless otherwise indicated,reference to that component (including a reference to a “means”) shouldbe interpreted as including as equivalents of that component anycomponent which performs the function of the described component (i.e.that is functionally equivalent), including components which are notstructurally equivalent to the disclosed structure which performs thefunction in the illustrated exemplary embodiments of the invention.

While a number of exemplary aspects and embodiments have been discussedabove, those of skill in the art will recognize certain modifications,permutations, additions and sub-combinations thereof. For example:

-   -   Method 300 may be multiply instantiated, such that there a        plurality of methods continually scheduling successive        iterations of themselves (for example, at the same        inter-repetition periods or at different inter-repetition        periods).    -   Some user-computing devices are known to have multiple and/or        application-specific image/video rendering engines. Such        image/video rendering engines may include suitable hardware        and/or software. By way of non-limiting example, Apple's iPhone™        and iPad™ devices include an application-specific 3D image/video        rendering engine. Some embodiments may involve triggering the        internet browser of the user-computing device to activate such        multiple and/or application-specific rendering engines. For        example, some embodiments may involve triggering the Safari™        internet browser of an iPhone™ or iPad™ device to use the        device's 3D rendering engine to help render the video content,        even though the video content may not include 3D video data. In        one specific, non-limiting embodiment, the following CSS code in        a web page will trigger Safari™ to use the 3D rendering engine:

<style type=“text/css”> body { margin: 0px; overflow: hidden; width :100%; // need the following 2 lines to trick safari to use the 3Daccelerator -webkit-transform: translateZ(−1000px);-webkit-transform-style: preserve-3d; } .container { position :absolute; display : block; // need the following 2 lines to trick safarito use the 3D accelerator -webkit-transform-style: preserve-3d;-webkit-transform : translateZ(0px); overflow : hidden; pointer-events:none; } </style>

-   -   In some embodiments, the internet browser is an application        program that is compiled for specific user-computing device        platforms. In other embodiments, the browser functionality is a        part of the operating system or in some cases is functionality        built into the device hardware.

It is therefore intended that the following appended claims and claimshereafter introduced are interpreted to include all such modifications,permutations, additions and sub-combinations as are within their truespirit and scope.

What is claimed is:
 1. A method executed by a computer system forrendering video content embodied by encoded video data on auser-computing platform that is one type of a plurality of differentuser-computing platform types, the method comprising: transmitting ascript to the user-computing platform, the script configured to beinterpreted by an application program operating on any one of theplurality of user-computing platform types; encoding a series of frameimages to provide the encoded video data, wherein encoding the frameimages comprises: for at least a first one of the frame images providedin a first file format: analyzing content of the first one of frameimages; selecting one among a plurality of secondary image file formatsbased on the analysis of the content of the first one of the frameimages; and if the first file format differs from the selected one ofthe secondary image file formats, converting the image file format ofthe first one of the frame images into the selected one of the secondaryfile formats; and for at least a second one of frame images provided ina second file format: analyzing content of the second one of frameimages; selecting a different one among the plurality of secondary imagefile formats based on the analysis of the content of the second one ofthe frame images; and if the second file format differs from theselected different one of the secondary image file formats, convertingthe image file format of the second one of the frame images into theselected different one of the secondary file formats; wherein each ofthe plurality of secondary image file formats is capable of beingnatively rendered by the application program; and transmitting theencoded video data to the user-computing platform; wherein the script isfurther configured to cause the script to be interpreted by theapplication program to: decode the transmitted encoded video data intodecoded video data comprising the frame images; and render the decodedvideo data by displaying the frame images.
 2. A method according toclaim 1 wherein encoding the frame images comprises, for each of theframe images, padding the content-transfer encoded frame image to aparticular size with padding data unrelated to the frame image.
 3. Amethod according to claim 1 wherein encoding the frame images comprisesencoding at least one of the frame images into a base64 content-transferformat.
 4. A method according to claim 1 wherein the script is furtherconfigured to cause the script to be interpreted by the applicationprogram to cause the interpreted script to directly decode thetransmitted encoded video data into the decoded video data.
 5. A methodaccording to claim 4 wherein the script is further configured to causethe script to be interpreted by the application program to cause theinterpreted script to directly decode encoded audio data received by theuser-computing platform into decoded audio data.
 6. A method accordingto claim 1 wherein the script is further configured to cause the scriptto be interpreted by the application program to decode encoded audiodata received by the user-computing platform into decoded audio data. 7.A method according to claim 6 wherein the script is further configuredto cause the script to be interpreted by the application program torender the decoded audio data by playing back the decoded audio data. 8.A method according to claim 7 wherein the video data and the audio dataare associated with one another as parts of a video content item, andwherein the script is further configured to cause the script to beinterpreted by the application program to directly synchronize thedisplaying of the frame images with the playback of the decoded audiodata.
 9. A method according to claim 7 wherein the video data and theaudio data are associated with one another as parts of a video contentitem, and wherein the script is further configured to cause the scriptto be interpreted by the application program to: ascertain an audioplayback time reference associated with the playback of the decodedaudio data; and directly synchronize the displaying of the frame imageswith the playback of the decoded audio data based on the audio playbacktime reference.
 10. A method according to claim 9 wherein synchronizingthe displaying of the frame images with the playback of the decodedaudio data comprises at least one of: advancing the display of frameimages out of order by skipping the display of one or more frame imagesbased on a determination that the rendering of the video data is behindthe audio playback time reference by a first threshold amount of time;and causing one or more frame images to be displayed for time periodslonger than those dictated by a frame rate of the video data based on adetermination that the rendering of the video data is ahead of the audioplayback time reference by a second threshold amount of time.
 11. Amethod according to claim 9 wherein synchronizing the displaying of theframe images with the playback of the decoded audio data comprises atleast one of: advancing the display of frame images out of order byskipping the display of one or more frame images based on adetermination that the rendering of the video data is behind the audioplayback time reference by a first threshold amount of time; and causingone or more frame images to be displayed for time periods longer thanthose dictated by a frame rate of the video data based on adetermination that the rendering of the video data is ahead of the audioplayback time reference by a second threshold amount of time.
 12. Amethod according to claim 11 wherein synchronizing the displaying of theframe images with the playback of the decoded audio data comprisesdetermining that the frame image associated with the current frame indexis behind one or more other frame images in a frame image queue and ifso skipping the displaying of the one or more other frame images.
 13. Amethod according to claim 11 wherein synchronizing the displaying of theframe images with the playback of the decoded audio data comprisesdetermining that the frame image associated with the current frame indexis not ready to be displayed and, in dependence on such determination,initiating a drop frame action, the drop frame action comprising one ormore of: recording an indication that the frame image associated withthe current frame index was not ready for rendering; causing theplayback of the decoded audio data to be paused or slowed; causing arate of decoding of the encoded video data to be increased; causing aswitch to video data having a lower frame rate; and causing a switch toeffective down-sampling of the video data by decoding a subset of theimage frames.
 14. A method according to claim 7 wherein the script isfurther configured to cause the script to be interpreted by theapplication program to simulate a multi-threaded execution environmentby: iteratively scheduling and performing a first simulated thread whichcomprises directly decoding the encoded video data into the decodedvideo data; and iteratively scheduling and performing a second simulatedthread which comprises rendering the video data by displaying the frameimages.
 15. A method according to claim 14 wherein the script is furtherconfigured to cause the script to be interpreted by the applicationprogram to simulate a multi-threaded execution environment by:iteratively scheduling and performing a third simulated thread whichcomprises directly decoding the encoded audio data into the decodedaudio data; and iteratively scheduling and performing a fourth simulatedthread which comprises implementing an audio renderer interface whichsupplies the decoded audio data to an audio renderer.
 16. A methodaccording to claim 14 wherein performing the first simulated threadcomprises: dividing the first simulated thread into a plurality ofsub-components; between the performance of pairs of sub-components,making one or more logical inquiries into one or more correspondingconditions and, in dependence on the one or more correspondingconditions, temporarily interrupting the first simulated thread toselect and perform an iteration of one of: the second simulated thread;and another simulated thread which involves implementing an audiorenderer interface which provides the decoded audio data to an audiorenderer.
 17. A method according to claim 7 wherein the script isfurther configured to cause the script to be interpreted by theapplication program to directly de-multiplex the video data from theaudio data.
 18. A method according to claim 7 wherein the script isfurther configured to cause the script to be interpreted by theapplication program to simulate a multi-threaded execution environmentby iteratively scheduling and performing a method which, on eachiteration makes one or more logical inquiries into one or morecorresponding conditions and, in dependence on the one or more of thecorresponding conditions, selects and performs one of: a first simulatedthread which comprises directly decoding the encoded video data into thedecoded video data; a second simulated thread which comprises renderingthe decoded video data by displaying the frame images; a third simulatedthread which comprises directly decoding the encoded audio data into thedecoded audio data; and a fourth simulated thread which comprisesimplementing an audio renderer interface which provides the decodedaudio data to an audio renderer.
 19. A method according to claim 6wherein the script is further configured to cause the script to beinterpreted by the application program to: natively render the decodedvideo data by displaying the frame images; and natively render thedecoded audio data by playing back the decoded audio data.
 20. A methodaccording to claim 6 wherein the script is further configured to causethe script to be interpreted by the application program to: render theaudio data by playing back the decoded audio data on the user-computingplatform; and render the video data by selecting a subset of the frameimages and displaying the selected subset of the frame images on theuser-computing platform.
 21. A method according to claim 1 whereinrendering the video data by displaying the one or more frame imagescomprises alpha-blending at least one pair of frame images together. 22.A method according to claim 1 wherein rendering the video data bydisplaying the one or more frame images comprises, at each of one ormore times between displaying a first one of the frame images anddisplaying a second one of the frame images, displaying an alpha-blendedimage comprising an alpha-blend of the first one of the frame images andthe second one of the frame images.
 23. A method according to claim 22wherein, at each of the one or more times between displaying the firstone of the frame images and displaying the second one of the frameimages, displaying the alpha-blended image comprises alpha-blending thesecond one of the frame images onto a preceding displayed image using analpha-blending coefficient α provided by:α=[/β+1−mod(f#,β)]⁻¹ where: β is a down-sampling factor equal to anumber of the one or more times +1; f# is an index referring to a numberof a current one of the one or more times; and mod(x,y) is a modulooperator which returns the whole number remainder of x divided by y. 24.A method according to claim 1 wherein the script is further configuredto cause the script to be interpreted by the application program tocause the interpreted script to directly implement at least a portion ofa video data queue monitor which directly monitors a video data queue todetermine its status and, in dependence on the determined status of thevideo data queue, determines whether to fetch more of the encoded videodata.
 25. A method according to claim 24 wherein the script is furtherconfigured to cause the script to be interpreted by the applicationprogram to implement a second portion of the video queue monitor whichfetches more of the encoded video data using an AJAX XMLHttpRequestobject.
 26. A method according to claim 24 wherein the script is furtherconfigured to cause the script to be interpreted by the applicationprogram to implement a second portion of the video queue monitor whichfetches more of the encoded video data by alternatingly using aplurality of AJAX XMLHttpRequest objects.
 27. A method according toclaim 1 wherein the script is further configured to cause the script tobe interpreted by the application program to cause the interpretedscript to directly implement a frame buffer monitor which monitors aframe image buffer to determine its status and, in dependence on thedetermined status of the frame image buffer, determines whether todecode more of the encoded video data.
 28. A method according to claim 1wherein the script is further configured to cause the script to beinterpreted by the application program to cause the interpreted scriptto directly convert an image file format of at least one of the frameimages from a first image file format into a second image file format,the second image file format capable of being natively rendered by theapplication program.
 29. A method according to claim 1 wherein encodingthe frame images comprises: converting an image file format of at leastone of the frame images from a first image file format into a secondimage file format, the second image file format capable of beingnatively rendered by the application program.
 30. A method according toclaim 1 wherein the script is further configured to cause the script tobe interpreted by the application program to natively convert at leastone of the frame images into a corresponding image object capable ofbeing natively rendered by the application program.
 31. A methodaccording to claim 1 wherein the application program comprises aninternet browser.
 32. A method according to claim 1 wherein the scriptis embedded in a HTML document.
 33. A method according to claim 1wherein the script is further configured to cause the script to beinterpreted by the application program: to query one or morecharacteristics of the user-computing platform; and, in dependence onthe one or more queried characteristics of the user-computing platform,to transmit a request to receive different encoded video data embodyingthe video content.
 34. A method according to claim 1 wherein the scriptis further configured to cause the script to be interpreted by theapplication program: to query one or more characteristics of theuser-computing platform; and, in dependence on the one or more queriedcharacteristics of the user-computing platform, to modify at least onecharacteristic of one or more of: the decoding of the encoded video dataand the displaying of the frame images.
 35. A method according to claim1 wherein the script is further configured to cause the script to beinterpreted by the application program: to determine a data rate atwhich the encoded video data is being received by the user-computingplatform; and, in dependence on the determined rate, to transmit arequest to receive different encoded video data embodying the videocontent.
 36. A method according to claim 1 wherein the script is furtherconfigured to cause the script to be interpreted by the applicationprogram: to determine a data rate at which the encoded video data isbeing received by the user-computing platform; and, in dependence on thedetermination, to modify at least one characteristic of one or more of:the decoding of the encoded video data and the displaying of the frameimages.
 37. A computer system comprising one or more computersoperatively connected using a data communications network adapted toperform the method of claim
 1. 38. A non-transitory computer-readablemedium comprising computer executable code that, when executed by acomputer system comprising one computer or a plurality of computersoperatively connected using a data communications network, causes thecomputer system to perform the method of claim
 1. 39. A method accordingto claim 1 wherein: encoding the frame images comprises encoding theframe images into a content-transfer format whereby the content-transferencoded frame images can be passed by a script interpreter interpretingthe script to the application program; and the decoded video datacomprises the content-transfer encoded frame images.
 40. A methodexecuted by a computer system for rendering video content embodied byencoded video data on a user-computing platform that is one type of aplurality of different user-computing platform types, the methodcomprising: transmitting a script to the user-computing platform, thescript configured to be interpreted by an application program operatingon any one of the plurality of user-computing platform types; encoding aseries of frame images to provide the encoded video data, whereinencoding the frame images comprises encoding the frame images into acontent-transfer format whereby the content-transfer encoded frameimages can be passed by a script interpreter interpreting the script tothe application program; and transmitting the encoded video data to theuser-computing platform; wherein the script is further configured tocause the script to be interpreted by the application program to: decodethe transmitted encoded video data into decoded video data comprisingthe content-transfer encoded frame images; and render the decoded videodata by displaying the frame images; wherein the script is furtherconfigured to cause the script to be interpreted by the applicationprogram to decode encoded audio data received by the user-computingplatform into decoded audio data; wherein the script is furtherconfigured to cause the script to be interpreted by the applicationprogram to render the decoded audio data by playing back the decodedaudio data; wherein the video data and the audio data are associatedwith one another as parts of a video content item, and wherein thescript is further configured to cause the script to be interpreted bythe application program to: ascertain an audio playback time referenceassociated with the playback of the decoded audio data; and directlysynchronize the displaying of the frame images with the playback of thedecoded audio data based on the audio playback time reference; whereinsynchronizing the displaying of the frame images with the playback ofthe decoded audio data comprises at least one of: advancing the displayof frame images out of order by skipping the display of one or moreframe images based on a determination that the rendering of the videodata is behind the audio playback time reference by a first thresholdamount of time; and causing one or more frame images to be displayed fortime periods longer than those dictated by a frame rate of the videodata based on a determination that the rendering of the video data isahead of the audio playback time reference by a second threshold amountof time.
 41. A method executed by a computer system for rendering videocontent embodied by encoded video data on a user-computing platform thatis one type of a plurality of different user-computing platform types,the method comprising: transmitting a script to the user-computingplatform, the script configured to be interpreted by an applicationprogram operating on any one of the plurality of user-computing platformtypes; encoding a series of frame images to provide the encoded videodata, wherein encoding the frame images comprises encoding the frameimages into a content-transfer format whereby the content-transferencoded frame images can be passed by a script interpreter interpretingthe script to the application program; and transmitting the encodedvideo data to the user-computing platform; wherein the script is furtherconfigured to cause the script to be interpreted by the applicationprogram to: decode the transmitted encoded video data into decoded videodata comprising the content-transfer encoded frame images; and renderthe decoded video data by displaying the frame images; wherein thescript is further configured to cause the script to be interpreted bythe application program to decode encoded audio data received by theuser-computing platform into decoded audio data; wherein the script isfurther configured to cause the script to be interpreted by theapplication program to render the decoded audio data by playing back thedecoded audio data; wherein the video data and the audio data areassociated with one another as parts of a video content item, andwherein the script is further configured to cause the script to beinterpreted by the application program to: ascertain an audio playbacktime reference associated with the playback of the decoded audio data;and directly synchronize the displaying of the frame images with theplayback of the decoded audio data based on the audio playback timereference; wherein synchronizing the displaying of the frame images withthe playback of the decoded audio data comprises: using the audioplayback time reference to determine a current frame index; and if theframe image associated with the current frame index is ready to bedisplayed, causing the frame image associated with the current frameindex to be displayed.
 42. A method according to claim 41 whereinsynchronizing the displaying of the frame images with the playback ofthe decoded audio data comprises determining that the frame imageassociated with the current frame index is behind one or more otherframe images in a frame image queue and if so skipping the displaying ofthe one or more other frame images.
 43. A method according to claim 41wherein synchronizing the displaying of the frame images with theplayback of the decoded audio data comprises determining that the frameimage associated with the current frame index is not ready to bedisplayed and, in dependence on such determination, initiating a dropframe action, the drop frame action comprising one or more of: recordingan indication that the frame image associated with the current frameindex was not ready for rendering; causing the playback of the decodedaudio data to be paused or slowed; causing a rate of decoding of theencoded video data to be increased; causing a switch to video datahaving a lower frame rate; and causing a switch to effectivedown-sampling of the video data by decoding a subset of the imageframes.
 44. A method executed by a computer system for rendering videocontent embodied by encoded video data on a user-computing platform thatis one type of a plurality of different user-computing platform types,the method comprising: transmitting a script to the user-computingplatform, the script configured to be interpreted by an applicationprogram operating on any one of the plurality of user-computing platformtypes; encoding a series of frame images to provide the encoded videodata, wherein encoding the frame images comprises encoding the frameimages into a content-transfer format whereby the content-transferencoded frame images can be passed by a script interpreter interpretingthe script to the application program; and transmitting the encodedvideo data to the user-computing platform; wherein the script is furtherconfigured to cause the script to be interpreted by the applicationprogram to: decode the transmitted encoded video data into decoded videodata comprising the content-transfer encoded frame images; and renderthe decoded video data by displaying the frame images; wherein thescript is further configured to cause the script to be interpreted bythe application program to decode encoded audio data received by theuser-computing platform into decoded audio data; wherein the script isfurther configured to cause the script to be interpreted by theapplication program to render the decoded audio data by playing back thedecoded audio data; wherein the script is further configured to causethe script to be interpreted by the application program to simulate amulti-threaded execution environment by iteratively scheduling andperforming a method which, on each iteration makes one or more logicalinquiries into one or more corresponding conditions and, in dependenceon the one or more of the corresponding conditions, selects and performsone of: a first simulated thread which comprises directly decoding theencoded video data into the decoded video data; a second simulatedthread which comprises rendering the decoded video data by displayingthe frame images; a third simulated thread which comprises directlydecoding the encoded audio data into the decoded audio data; and afourth simulated thread which comprises implementing an audio rendererinterface which provides the decoded audio data to an audio renderer.45. A method executed by a computer system for rendering video contentembodied by encoded video data on a user-computing platform that is onetype of a plurality of different user-computing platform types, themethod comprising: transmitting a script to the user-computing platform,the script configured to be interpreted by an application programoperating on any one of the plurality of user-computing platform types;encoding a series of frame images to provide the encoded video data,wherein encoding the frame images comprises encoding the frame imagesinto a content-transfer format whereby the content-transfer encodedframe images can be passed by a script interpreter interpreting thescript to the application program; and transmitting the encoded videodata to the user-computing platform; wherein the script is furtherconfigured to cause the script to be interpreted by the applicationprogram to: decode the transmitted encoded video data into decoded videodata comprising the content-transfer encoded frame images; and renderthe decoded video data by displaying the frame images; wherein thescript is further configured to cause the script to be interpreted bythe application program to decode encoded audio data received by theuser-computing platform into decoded audio data; wherein the script isfurther configured to cause the script to be interpreted by theapplication program to render the decoded audio data by playing back thedecoded audio data; wherein the script is further configured to causethe script to be interpreted by the application program to simulate amulti-threaded execution environment by: iteratively scheduling andperforming a first simulated thread which comprises directly decodingthe encoded video data into the decoded video data; and iterativelyscheduling and performing a second simulated thread which comprisesrendering the video data by displaying the frame images; whereinperforming the first simulated thread comprises: dividing the firstsimulated thread into a plurality of sub-components; between theperformance of pairs of sub-components, making one or more logicalinquiries into one or more corresponding conditions and, in dependenceon the one or more corresponding conditions, temporarily interruptingthe first simulated thread to select and perform an iteration of one of:the second simulated thread; and another simulated thread which involvesimplementing an audio renderer interface which provides the decodedaudio data to an audio renderer.
 46. A method executed by a computersystem for rendering video content embodied by encoded video data on auser-computing platform that is one type of a plurality of differentuser-computing platform types, the method comprising: transmitting ascript to the user-computing platform, the script configured to beinterpreted by an application program operating on any one of theplurality of user-computing platform types; encoding a series of frameimages to provide the encoded video data, wherein encoding the frameimages comprises encoding the frame images into a content-transferformat whereby the content-transfer encoded frame images can be passedby a script interpreter interpreting the script to the applicationprogram; and transmitting the encoded video data to the user-computingplatform; wherein the script is further configured to cause the scriptto be interpreted by the application program to: decode the transmittedencoded video data into decoded video data comprising thecontent-transfer encoded frame images; and render the decoded video databy displaying the frame images; wherein rendering the video data bydisplaying the one or more frame images comprises, at each of one ormore times between displaying a first one of the frame images anddisplaying a second one of the frame images, displaying an alpha-blendedimage comprising an alpha-blend of the first one of the frame images andthe second one of the frame images; wherein, at each of the one or moretimes between displaying the first one of the frame images anddisplaying the second one of the frame images, displaying thealpha-blended image comprises alpha-blending the second one of the frameimages onto a preceding displayed image using an alpha-blendingcoefficient α provided by:α=[β+1−mod(f#,β)]⁻¹ where: β is a down-sampling factor equal to a numberof the one or more times +1; f# is an index referring to a number of acurrent one of the one or more times; and mod(x,y) is a modulo operatorwhich returns the whole number remainder of x divided by y.
 47. A systemfor rendering video content embodied by encoded video data on auser-computing platform that is one type of a plurality of differentuser-computing platform types, the system comprising: a server computingdevice configured to: transmit a script to the user-computing platform,the script configured to be interpreted by an application programoperating on any one of the plurality of user-computing platform types;encode a series of frame images to provide the encoded video data,wherein encoding the frame images comprises encoding the frame imagesinto a content-transfer format whereby the content-transfer encodedframe images can be passed by a script interpreter interpreting thescript to the application program; and transmit the encoded video datato the user-computing platform; wherein the script is further configuredto cause the script to be interpreted by the application program to:decode the transmitted encoded video data into decoded video datacomprising the content-transfer encoded frame images; and render thedecoded video data by displaying the frame images; wherein the servercomputing device configured to encode the frame images comprises theserver computing device configured to: for at least a first one of theframe images provided in a first file format: analyze content of thefirst one of the frame images; select one among a plurality of secondaryimage file formats based on the analysis of the content of the first oneof the frame images; and if the first file format differs from theselected one of the secondary image file formats, convert the image fileformat of the first one of the frame images into the selected one of thesecondary file formats; and for at least a second one of the frameimages provided in a second file format: analyze content of the secondone of the frame images; select a different one among the plurality ofsecondary image file formats based on the analysis of the content of thesecond one of the frame images; and if the second file format differsfrom the selected different one of the secondary image file formats,convert the image file format of the second one of the frame images intothe selected different one of the secondary file formats; wherein eachof the plurality of secondary image file formats is capable of beingnatively rendered by the application program.
 48. A method executed by acomputer system for rendering video content embodied by encoded videodata on a user-computing platform that is one type of a plurality ofdifferent user-computing platform types, the method comprising:transmitting a script to the user-computing platform, the scriptconfigured to be interpreted by an application program operating on anyone of the plurality of user-computing platform types; encoding a seriesof frame images to provide the encoded video data, wherein encoding theframe images comprises encoding the frame images into a content-transferformat whereby the content-transfer encoded frame images can be passedby a script interpreter interpreting the script to the applicationprogram; and transmitting the encoded video data to the user-computingplatform; wherein the script is further configured to cause the scriptto be interpreted by the application program to: decode the transmittedencoded video data into decoded video data comprising thecontent-transfer encoded frame images; and render the decoded video databy displaying the frame images; wherein encoding the frame imagescomprises: for at least a first one of the frame images provided in afirst file format: analyzing content of the first one of the frameimages; selecting one among a plurality of secondary image file formatsbased on the analysis of the content of the first one of the frameimages; and if the first file format differs from the selected one ofthe secondary image file formats, converting the image file format ofthe first one of the frame images into the selected one of the secondaryfile formats; and for at least a second one of the frame images providedin a second file format: analyzing content of the second one of theframe images; selecting a different one among the plurality of secondaryimage file formats based on the analysis of the content of the secondone of the frame images; and if the second file format differs from theselected different one of the secondary image file formats, convertingthe image file format of the second one of the frame images into theselected different one of the secondary file formats; wherein each ofthe plurality of secondary image file formats is capable of beingnatively rendered by the application program.
 49. A method executed by acomputer system for rendering video content on a user-computing platformthat is one type of a plurality of different user-computing platformtypes, the method comprising: encoding a series of frame images toprovide encoded video data, wherein encoding the frame images comprisesconverting the frame images into a content-transfer format; transmittingthe encoded video data to the user-computing platform, whereintransmitting the encoded data results in a script interpreter of anapplication program operating on the user-computing platforminterpreting a script to: decode the transmitted encoded video data intodecoded frame image data in the content-transfer format; and pass thedecoded frame image data in the content transfer format to theapplication program in order that the decoded frame image data berendered; wherein encoding the frame images comprises: for at least afirst one of the frame images provided in a first file format: analyzingcontent of the first one of the frame images; selecting one among aplurality of secondary image file formats based on the analysis of thecontent of the first one of the frame images; and if the first fileformat differs from the selected one of the secondary image fileformats, converting the image file format of the first one of the frameimages into the selected one of the secondary file formats; and for atleast a second one of the frame images provided in a second file format:analyzing content of the second one of the frame images; selecting adifferent one among the plurality of secondary image file formats basedon the analysis of the content of the second one of the frame images;and if the second file format differs from the selected different one ofthe secondary image file formats, converting the image file format ofthe second one of the frame images into the selected different one ofthe secondary file formats; wherein each of the plurality of secondaryimage file formats is capable of being natively rendered by theapplication program.
 50. A method executed by a computer system forrendering video content on a user-computing platform that is one type ofa plurality of different user-computing platform types, the methodcomprising: encoding a series of frame images to provide encoded videodata, wherein encoding the frame images comprises converting the frameimages into a content-transfer format, whereby the content-transferencoded frame images can be passed from a script interpreter of anapplication program operating on the user-computing platform to theapplication program when the script interpreter interprets a script todecode the encoded video data into decoded video data comprising thecontent-transfer encoded frame images and render the decoded video databy displaying the frame images; wherein encoding the frame imagescomprises: for at least a first one of the frame images provided in afirst file format: analyzing content of the first one of the frameimages; selecting one among a plurality of secondary image file formatsbased on the analysis of the content of the first one of the frameimages; and if the first file format differs from the selected one ofthe secondary image file formats, converting the image file format ofthe first one of the frame images into the selected one of the secondaryfile formats; and for at least a second one of the frame images providedin a second file format: analyzing content of the second one of theframe images; selecting a different one among the plurality of secondaryimage file formats based on the analysis of the content of the secondone of the frame images; and if the second file format differs from theselected different one of the secondary image file formats, convertingthe image file format of the second one of the frame images into theselected different one of the secondary file formats; wherein each ofthe plurality of secondary image file formats is capable of beingnatively rendered by the application program.